Best way to compare 2 JSON files in Java

后端 未结 10 647
囚心锁ツ
囚心锁ツ 2020-12-13 13:56

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

10条回答
  •  北海茫月
    2020-12-13 14:07

    For people who are already using Jackson, I recommend json-patch

    final JsonNode patchNode = JsonDiff.asJson(firstNode, secondNode);
    System.out.println("Diff=" + m.writeValueAsString(patchNode));
    

提交回复
热议问题