with open(r'E:\file\file.json', 'r') as data_compare:
d1 = json.load(data_compare)
set1 = set(d1)
with open(r'E:\file\file2.json', 'r') as data_updated:
d2 = json.load(data_updated)
set2 = set(d2)
compare = set2 - set1
print(compare)
the output of this is only 'set()' for some reason, can anyone explain what i am doing wrong? Here is a small sample of one of my json files (the other is identical in terms of structure and keys, the values only differ)
{
"data": [
{
"Process": "proc",
"num": "00000",
},
{
"Process": "process",
"num": "00101",
}
]
}
THIS IS NOT A DUPLICATE, this involves loading data from a json to a python object, not comparing pre existing python dictionaries