~mcepl/json_diff#16: 
Recursion depth error when processing null element with main

Hello Matej,

I've tried json_diff yesterday, and ran into a recursion depth error when processing some json files through the main. Nb: I was using an older version with python 2.7.

I ran some more tests, and found out that: json_diff.Comparator().compare_dicts(json.load(open(f1)), json.load(open(f2))) => works correcly json_diff.Comparator(open(f1)), open(f2)).compare_dicts() => throws a recursion depth error

I think this stems from the fact that my json contains some null values. When delving recursively into the structure, when compare_dicts encounters a null, it uses the obj1 or obj2 from the init, and starts over from the beginning.

I haven't tried to fix it yet, but I think it's not useful to store the objects in the class, and the main could call Comparator(opts=options).compare_dicts(json.load(open(f1)), json.load(open(f2)).

Status
REPORTED
Submitter
~mcepl
Assigned to
No-one
Submitted
9 months ago
Updated
9 months ago
Labels
No labels applied.

~mcepl 9 months ago

Do you want to take over this project? It was seven years or so when I lost interest in this script, if you want to take it over, it is free for adoption both here and on PyPI.

Register here or Log in to comment, or comment via email.