javajsoncomparison

Best way to compare two JSON files in Java


How would you suggest this task is approached?

The challenge as i see it is in presenting diff information intelligently. Before i go reinventing the wheel, is there an accepted approach of how such a comparison should be handled?


Solution

  • You could try the XStream's architecture, handling of JSON mappings

    Also, take a look at this post: Comparing two XML files & generating a third with XMLDiff in C#. It's in C# but the logic is the same.