The goal is to get the difference of around 30'000 json files in 2 two folders. In both Folders their names are just numbers (1.json, 2.json etc.). So basically get the diff of the two folders.
I'm using the jsonDiff module to get the difference which works fine for single files but i haven't found a way to use the module in a loop.
f = open("/folder1/1.json")
fe = open("/folder2/1.json")
jyson1 = json.load(f)
jyson2 = json.load(fe)
print(diff(jyson1, jyson2))
EDIT: Because i have to parse through 2 folders, I think i need 2 for loops with glob like this
for f in glob("/folder1/*.json"):
with open(f) as fe:
data_old = json.load(fe)
for e in glob("/folder2/*.json"):
with open(e) as ee:
data_new = json.load(fe)
I struggle to understand how i can use the diff() method here