比较Java中2个JSON文件的最佳方法 [英] Best way to compare 2 JSON files in Java

查看:605
本文介绍了比较Java中2个JSON文件的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您如何建议完成此任务?

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?

推荐答案

您可以尝试 XStream的体系结构,处理JSON映射

也请看一下这篇文章:

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.

这篇关于比较Java中2个JSON文件的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆