import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.JSONArray;
public class fastJsonDiff {
@SuppressWarnings("unchecked")
public static void compareJson(JSONObject json1, JSONObject json2, String key) {
Iteratori = json1.keySet().iterator();
while (i.hasNext()) {
key = i.next();
compareJson(json1.get(key), json2.get(key), key);
}
// return sb.toString();
}
public static void compareJson(Object json1, Object json2, String key) {
if (json1 instanceof JSONObject) {
// System.out.println("this JSONObject----" + key);
compareJson((JSONObject) json1, (JSONObject) json2, key);
} else if (json1 instanceof JSONArray) {
// System.out.println("this JSONArray----" + key);
compareJson((JSONArray) js