An API you depend on ships a change, and now something downstream behaves differently. You have the old response saved and the new one in front of you, and they look almost identical: hundreds of lines, same shape, same field names. Somewhere in there, one value moved, one field appeared, or one field quietly vanished. Reading both documents side by side to catch it is slow and unreliable.
A JSON diff does that comparison structurally. Instead of lining up text, it walks both documents path by path and reports only what was added, removed or changed. This guide shows how to review an API response change that way, using the free JSON Diff Checker on Ovatly, which runs in your browser and uploads nothing.
Contents
- Quick answer
- Why text comparison fails on JSON
- What the report actually lists
- How to review a response change, step by step
- Worked example: one change and one addition
- How arrays and numbers are treated
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
To review an API response change: save the response from before the change and capture the response after it, paste both into the JSON Diff Checker, and read the report path by path. It lists every added, removed and changed value with its old and new value, and nothing else. Because the comparison is structural, differences in key order or formatting never appear as noise, so every line in the report is a real change worth a decision.
Why text comparison fails on JSON
A plain text diff compares lines, and JSON punishes that approach twice. First, the same data can be written many ways: keys in a different order, different indentation, a whole object on one line. A text diff flags all of that as change even when the data is identical. Second, real responses are long, and the one value that actually changed hides among hundreds of lines that did not.
Structural comparison removes both problems. The tool parses each document into its values and matches them by path: the value at address.city on the left is compared with the value at address.city on the right. If they match, nothing is reported, however differently they were written. If they differ, the report shows that one path with both values, and the rest of the document needs no attention.
What the report actually lists
Every difference falls into one of three kinds. Added means a path exists in the new response that was not in the old one. Removed means a path existed before and is gone now. Changed means the path exists on both sides but the value differs, and the report shows the old value and the new value together.
One case is worth knowing before you read your first report: a type change counts as a single changed entry. If a field that used to hold a number now holds a string, the report shows one changed line for that path with both values, not a removal plus an addition. That matters: type changes are the ones most likely to break a client expecting the old type.
How to review a response change, step by step
- Save the response from before the change. If you did not keep one, a documented example or a capture from the previous version of your own app is better than nothing.
- Capture the response after the change, calling the same endpoint with the same inputs, so the only differences are the ones the change itself introduced.
- Open the JSON Diff Checker and paste the old response on one side and the new response on the other.
- Read the report from the top. For each entry, note the path, whether it was added, removed or changed, and the old and new values.
- Decide on each entry: expected, harmless, or a problem for anything that consumes this response. A removed field or a changed type deserves more attention than an added field.
Worked example: one change and one addition
Suppose a profile endpoint returned this before a release:
{
"name": "Ana",
"age": 31
}
After the release, the same call returns this:
{
"name": "Ana",
"age": 32,
"city": "Lisbon"
}
The diff report for that pair is two lines:
CHANGED age: 31 -> 32
ADDED city: "Lisbon"
Read as a review, that is the whole story of the release for this endpoint. The age value changed from 31 to 32, which is the data itself moving, not a contract change. The city field is new: clients that ignore unknown fields will not notice it, and clients that validate strictly may need to be told. Nothing was removed, and name is absent from the report because it did not change. On a real response with hundreds of fields, the report stays this readable.
How arrays and numbers are treated
Arrays are compared by index. The first element of the old array is compared with the first element of the new array, the second with the second, and so on. That suits ordered data such as a list of results, but it has one consequence: if an element is inserted near the start of an array, every element after it shifts by one position, and the report will show those shifted elements as changed even though the same values are present. When a report shows a long run of changed array entries, check for an insertion or removal before concluding that all of them were edited.
Numbers are compared by value, not by spelling. A value written as 1 on one side and 1.0 on the other counts as the same number and is not reported. That keeps formatting habits out of the report: the question is whether the data changed, not whether the text did.
Limitations and honest tradeoffs
The tool compares the two documents you give it, and nothing else. It cannot tell you whether a change was intentional, whether it matches a changelog, or whether a changed value is correct, only that it differs. Judgement about each entry is still yours.
If one side is not valid JSON, the tool names that side and produces no partial diff. That is the honest behaviour, since a document that fails to parse cannot be compared reliably, but it means a malformed capture has to be fixed before the review can start. And because arrays compare by index, the tool does not track an element that moved to a different position; it reports the positions as changed.
Common mistakes
- Diffing responses from different inputs. If the two captures came from different requests, the report mixes the API change with the input difference. Capture both sides with the same call.
- Reading a long array report as mass edits. A single insertion shifts every later index. Check for an insertion or removal first.
- Skipping the type changes. A number that became a string is one quiet line in the report and the change most likely to break a consumer.
- Trusting a partial capture. A truncated response may parse as valid JSON for the wrong reason or fail outright. Capture the full body on both sides.
- Reviewing only the additions. Removed fields break existing clients more often than added ones. Read all three kinds of entry.
FAQs
What does a JSON diff report show? It shows the values that were added, removed or changed between the two documents, each listed by its path with the old value and the new value. Anything identical on both sides is left out, so the report is only as long as the actual difference.
Why does the diff show no changes when the key order is different? The comparison is structural, not textual. It matches values by their path in the document, so an object whose keys were written in a different order, or a response that was reformatted, compares as identical.
How are arrays compared in a JSON diff? Arrays are compared by index: the element at index 0 on the left is compared with the element at index 0 on the right, and so on. Inserting an element near the start of an array will therefore show the shifted elements as changed.
Is 1 the same as 1.0 in a JSON diff? Yes. The tool treats 1 and 1.0 as the same number, so a value that only changed its written form is not reported as a change.
What happens if one of the responses is not valid JSON? The tool names the side that failed to parse and produces no partial diff. A partial report would be misleading, because everything after the syntax error cannot be compared reliably.
Conclusion
Reviewing an API change stops being an eyeball exercise once the comparison is structural: the report is a short list of paths, each marked added, removed or changed, with both values shown. The JSON Diff Checker produces that list in your browser from the two responses you paste in. The same technique works just as well on files you own, and our companion guide on comparing a config file before and after an update walks through that case. For more guides in this series, see our Data and JSON Tools guides.
References
- RFC 8259, The JavaScript Object Notation (JSON) Data Interchange Format: https://www.rfc-editor.org/rfc/rfc8259
- MDN Web Docs, on working with JSON: https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Scripting/JSON