JSON Mirror
How to use JSON Mirror's five-change example
Start with JSON Mirror's built-in example to learn how the direction of a comparison affects its result. The example runs immediately and produces five structural differences. Inspect the values, filter the result, reverse the inputs and save a local report before replacing the sample with your own documents.
Load a pair with known changes
Select Load example. The Original and Updated editors fill with project records, and comparison runs immediately. This replaces anything already in the editors, so use it before pasting documents you need to retain. There are five differences: version and settings.theme change, a member is added at index 2, status is removed and published is added.
The unchanged project name, notification setting and first two members do not appear as differences. Object key order and indentation are ignored because comparison uses parsed JSON values. Arrays compare by position, so this example's extra member is an addition at the end rather than a detected move.
Read paths alongside values
Each result includes a readable path such as $.settings.theme and its JSON Pointer equivalent, /settings/theme. The member addition appears at $.members[2], with pointer /members/2. Original and Updated values tell you which direction the change takes. Missing values are shown as Not present and remain different from explicit null.
Use Changed, Added and Removed to select a category. The sample has two Changed, two Added and one Removed entry. Return to All changes to see all five. Filter by path narrows the displayed rows using either path notation; entering /settings finds the theme change without searching the values or editing either source.
Reverse the comparison deliberately
Select Swap. The editor contents exchange places and the old result is marked stale. Export report is disabled until you select Compare JSON again. Ctrl or Command plus Enter also compares. An old visible result is not evidence about the swapped inputs.
After comparison, status becomes Added and published and the extra member become Removed. The version and theme entries remain Changed, with their values reversed. This rehearsal helps avoid describing a deletion as an addition when the newer document has been pasted into Original.
Save a complete local report
Select Export report to request json-mirror-report.json. The file includes every difference, readable paths, JSON Pointer paths and the selected trimStringEdges rule. Category and path filters do not limit the export. The file is created in the browser; downloading is a separate action from comparison.
For large comparisons the page initially displays 300 matching entries. Show 300 more reveals another batch. Export remains the way to save the complete result, including entries outside the visible batch. A report contains differences and their values, not complete copies of both input documents.
Replace the example with your own inputs
Paste the earlier document into Original and the proposed document into Updated, then compare again. Editing marks previous results stale and disables export. Invalid JSON preserves your text for correction. Each editor accepts up to 1,000,000 characters, and traversal rejects more than 120 nesting levels. JavaScript number precision applies; represent exact large identifiers as strings.
Trim string edges optionally ignores leading and trailing whitespace when comparing string values. It does not rewrite either editor, trim keys or ignore case. Leave it off for an exact value review. Working data stays in tab memory, and Clear or reload discards it; retain your source files and downloaded reports outside the tab.
Updated after consolidating the JSON Mirror versions. Instructions were checked against the canonical implementation.
Frequently asked questions
Does Load example run a comparison?
Yes. Load example fills Original and Updated and immediately compares them, replacing any input text. The example produces five differences.
Can I download the example report?
Yes. Export report downloads every difference as json-mirror-report.json. Visible filters do not limit the export.
Does swapping update the report?
Swap exchanges the inputs and marks the report stale. Select Compare JSON again to calculate reversed additions and removals.