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
The easiest way to compare json strings is using JSONCompare from JSONAssert library. The advantage is, it's not limited to structure only and can compare values if you wish:
JSONCompareResult result =
JSONCompare.compareJSON(json1, json2, JSONCompareMode.STRICT);
System.out.println(result.toString());
which will output something like:
Expected: VALUE1
got: VALUE2
; field1.field2