Multilevel JSON diff in python
问题 Please link me to answer if this has already been answered, my problem is i want to get diff of multilevel json which is unordered. x=json.loads('''[{"y":2,"x":1},{"x":3,"y":4}]''') y=json.loads('''[{"x":1,"y":2},{"x":3,"y":4}]''') z=json.loads('''[{"x":3,"y":4},{"x":1,"y":2}]''') import json_tools as jt import json_delta as jd print jt.diff(y,z) print jd.diff(y,z) print y==z print x==y output is [{'prev': 2, 'value': 4, 'replace': u'/0/y'}, {'prev': 1, 'value': 3, 'replace': u'/0/x'}, {'prev