This tool does not detect absolute difference between the 2 datasets.
Example:
1s.json:
2s.json:
{
"Key1": "1",
"Key2": "1"
}
$ python comparejson.py 2s.json 1s.json
Reason: Length Mismatch: Expected Length: 2, Actual Length: 1
Expected:
{
"Key1": "1",
"Key2": "2"
}
Actual:
{
"Key1": "1"
}
Missing keys: [u'Key2']
$ python comparejson.py 1s.json 2s.json
$
Is this a bug or an (undocumented) feature?
In comparison, jsondiff detects difference no matter what is the order:
$ jsondiff 1s.json 2s.json
{"Key2": "2"}%
$ jsondiff 2s.json 1s.json
{"$delete": ["Key2"]}%