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
This only addresses equality, not differences.
With Jackson.
ObjectMapper mapper = new ObjectMapper();
JsonNode tree1 = mapper.readTree(jsonInput1);
JsonNode tree2 = mapper.readTree(jsonInput2);
boolean areTheyEqual = tree1.equals(tree2);
From the JavaDoc for JsonNode.equals:
Equality for node objects is defined as full (deep) value equality. This means that it is possible to compare complete JSON trees for equality by comparing equality of root nodes.