How the comparison works
Unlike a text diff, which compares lines, this tool compares the structure of the two documents. It walks both trees together and reports each difference with a path such as $.user.tags[2]. Reformatting, different indentation and a different order of object keys are not differences at all, because they do not change the data.
There are four kinds of result. Added means the path exists only on the right, removed means it exists only on the left, changed means the value differs, and type changed means the kind of value changed, for instance the number 5 became the string "5", a common source of API bugs.
Arrays are compared by position by default, so inserting an item at the front shows up as many changes. Tick Ignore array order to compare arrays as unordered collections, which is the right choice for tag lists and sets of IDs. Use Copy report to paste the list into a ticket or pull request.
Worked example
Left:
{"name":"widget","price":9.99,"tags":["a","b"],"dims":{"w":10,"h":5},"stock":12}
Right:
{"name":"widget","price":11.5,"tags":["a","b","c"],"dims":{"w":10,"h":"5"},"sku":"W-1"}
Result:
Changed $.price 9.99 -> 11.5
Added $.tags[2] "c"
Type changed $.dims.h 5 -> "5"
Removed $.stock 12
Added $.sku "W-1"
Five differences, each one located precisely, even though the two documents look almost identical at a glance.
When to use it
- Checking what changed between two API responses after a deploy.
- Reviewing configuration or fixture changes where line-based diffs are noisy.
- Verifying a data migration kept every field.
- For free-form text, code or logs, use the text diff instead.
Frequently asked questions
Does key order matter?
No. Two objects with the same keys and values are equal regardless of the order of the keys, as the JSON standard defines objects as unordered.
How are arrays compared?
By position by default, so the first item of the left array is compared with the first of the right one. Turn on Ignore array order to compare them as unordered collections instead.
Can it compare very large documents?
Yes, within the memory of your device. The comparison walks both trees once, so it is fast, and the result list stays readable because it shows only the differences.
What is a type change?
It means the value is now a different kind of thing, such as a number turning into a string or an object into an array. These are flagged separately because they often break consumers even when the text looks similar.