How to use this tool
- Enter original json, updated json.
- Select Update result to view the result.
- Check the method and assumptions below before using the result.
Input reference and sample values
Use the units and choices shown for each field. Sample values are provided for practice, not as recommendations.
| Input | Format and units | Sample |
|---|---|---|
| Original JSON | Keep the structure and separators shown in the sample. Line breaks are retained in this input. | {"name":"Sam","active":false,"roles":["reader"]} |
| Updated JSON | Keep the structure and separators shown in the sample. Line breaks are retained in this input. | {"name":"Sam","active":true,"roles":["reader","editor"]} |
Result for these sample inputs
[
{
"path": "/active",
"change": "changed",
"before": false,
"after": true
},
{
"path": "/roles/1",
"change": "added",
"after": "editor"
}
]- Differences
- 2
Select Try the example in the form to load these values and calculate them again. This replaces the current form inputs. Compare the result with the method and worked explanation below.
The method, explained
Parse both documents, ignore object-property ordering, and recursively compare values. Array order remains significant. Change locations use JSON Pointer escaping.
Using original json = {"name":"Sam","active":false,"roles":["reader"]}, updated json = {"name":"Sam","active":true,"roles":["reader","editor"]}, the result is [ { "path": "/active", "change": "changed", "before": false, "after": true }, { "path": "/roles/1", "change": "added", "after": "editor" } ]. Change these example inputs to match your task; use the method above to check each step.
What to keep in mind
Array insertions can produce multiple positional changes. Inputs are limited to 20,000 characters; very deep JSON is rejected.
Common questions
Is whitespace a difference?
No. Whitespace and object-key ordering do not affect this comparison. Different types do: the number 1 differs from the string "1".
Is array order ignored?
No. Arrays are ordered sequences, so moving an item can change several index positions.
Methodology maintained by ClarityKit. How these tools are built and checked.