simonw / csv-diff

Python CLI tool and library for diffing CSV and JSON files
Apache License 2.0
292 stars 47 forks source link

Handle case where new keys are added to JSON objects (--format json) #13

Open simonw opened 3 years ago

simonw commented 3 years ago

Right now if the first JSON object is missing keys that are present in the second JSON object the script crashes.

simonw commented 3 years ago

I'm going to fix this by having the load_json() function normalize the JSON it loads it so any missing keys from any of the objects become keys against null.

simonw commented 3 years ago

I'll close this issue once I've seen my production deployment of this fix work correctly for a while.