A visual view of the differences
The viewer shows the two documents next to each other. Lines that are the same are shown plainly, lines that were removed are red on the left, lines that were added are green on the right, and lines that changed are shown in both colors with the changed characters marked. It works like the diff view in a code review, but it is built for JSON.
Both sides are put in the same shape first
Before the lines are compared, both documents are printed with the same indentation, and the keys are sorted. Without that, two documents with the same data could look completely different in a line comparison. If you want to see the keys in their original order, turn off Sort keys in the viewer.
Views
- Side by side: the left document, the right document and line numbers for each.
- Unified: one column, with a minus for removed lines and a plus for added lines, like the output of git diff.
- Changes: the list of differences with paths, which is quicker to scan when only a few values changed.
Fold unchanged lines
Tick Show only changes to hide the lines that did not change, apart from three lines of context around each difference. This is useful for large documents where only a few places differ. The hidden stretches are shown as a line that says how many lines were left out.
Tips
- Arrays are compared in order, unless you tick Ignore array order, which also sorts the items in the view so that the lines can be compared.
- Ignored keys are taken out of both sides before the view is made.
- Very long documents are limited to the first 5000 lines in the view. The list of changes always covers everything.
For a plain list of differences, see JSON diff, and for the comparison options, see JSON compare. You can also open files with compare two JSON files.