A function compare_json_data(source_data_a,source_data_b)
, accepting structures populated with data loaded from json.load()
and comparing for equality.
$ ./compare.py
Compare JSON result is: True
JSON files a.json
and b.json
are loaded via load_json()
function and structures passed into compare_json_data()
for comparison.
@avoidik if I sort the lists, they are no longer considered equal... e.g.
those are not equal - what I want... but if sorted first before index/value compare...
now they are equal... but not from the source JSON struct.