import java.util.Iterator;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
public class JsonDiff {
// private static StringBuilder sb = new StringBuilder();
@SuppressWarnings("unchecked")
public static void compareJson(JSONObject json1, JSONObject json2,String key) {
Iterator<String> i = json1.keys();
while (i.hasNext()) {
key = i.next();
java比较两段json不同工具类(两个同一类型的java对象比较也推荐转成JSON再进行比较)
最新推荐文章于 2024-05-05 21:01:14 发布