jsondiff icon indicating copy to clipboard operation
jsondiff copied to clipboard

Diff JSON and JSON-like structures in Python

Results 29 jsondiff issues
Sort by recently updated
recently updated
newest added

Hi and thanks for the great library. My use case is that I compare DOM trees that are represented as JSON files to find the difference between two similar webpages....

enhancement
help wanted

print(diff(['a', {"a": 0, "b": 111}], [{"a": 0, "b": 11}, 'c'])) {0: {'b': 11}, insert: [(1, 'c')], delete: [0]} I need the result like: {replace: [(1, 0, {'b': 11})], insert: [(1,...

question

Looks like just released 2.0.0 fail on use pep517 based build with latest `setuptools` 62.0.0 ```console + /usr/bin/python3 -sBm build -w --no-isolation * Getting dependencies for wheel... running egg_info creating...

`nose-randomly` is archived an is no longer maintained https://github.com/adamchainz/nose-randomly/ Additionally pytest cannot find with default settings any units ``` + /usr/bin/pytest -ra tests =========================================================================== test session starts ============================================================================ platform linux...

If only removals occurred, 'smatched' is never incremented defaulting s==1. To print the entire list of changes, also check for whether any changes occurred before returning an empty dict.

question; What is the complexity of current algorithms that compute difference?

question

How to get string key instead of object in below code `diff({'a': 1, 'b': 2}, {'b': 3, 'c': 4}, syntax='symmetric', , marshal=True)`

enhancement
question

Hi, I did some tests with the library and I have a case scenario where one of the compared JSON is empty: { }. I am using syntax='explicit' and the...

I see the output is a dictionary with a location of the items that were removed. Is there a quick way to turn that into a bunch of dict keys...

Currently I use the following: with open('a.json', encoding='utf-8') as f1: data1 = json.loads(f1.read()) with open('b.json', encoding='utf-8') as f2: data2 = json.loads(f2.read()) abc=diff(data1, data2, syntax='symmetric') print(json.dumps(abc, indent=4))