forgehub. A small, independent toolbox

JSON Mirror

Why does JSON Mirror count a whole object as one difference?

JSON Mirror counts ledger entries, not every field affected by a replacement. If a value changes type, or an entire object or array is added or removed, it records one entry at that location. Read both values before judging the scope. For a closer comparison, manually paste corresponding smaller values into Before and After and compare again.

Open JSON Mirror

Recognize a replacement before counting its fields

Suppose Before contains {"delivery":{"method":"courier","days":2}} and After contains {"delivery":"collection"}. Select Compare JSON. JSON Mirror records one Changed entry at /delivery, showing the old object beside the new string. It does not create separate Removed entries for method and days.

The comparison checks the kinds of the two values before inspecting their children. An object becoming a string ends that branch of the comparison immediately. Objects, arrays and null are distinguished, so an object becoming an array also produces one Changed entry, even if the array contains objects with familiar field names.

Separate a new branch from edits inside an existing branch

Compare {} with {"delivery":{"method":"courier","days":2}}. The result is one Added entry at /delivery containing the object. Reverse those documents and it is one Removed entry. The tool detects that the key exists on only one side and records its value without descending into it.

Now keep delivery as an object on both sides: change {"delivery":{"method":"courier","days":2}} to {"delivery":{"method":"collection","days":0}}. This time the comparison visits the children and records two Changed entries, at /delivery/method and /delivery/days. The difference in counts follows the structure being compared.

Use the ledger count to navigate, then read both values

A total of one difference is not a measure of how small or safe an application change is. One replaced object can contain many settings. Start with All changes, find the affected branch, and read its Before and After values to establish whether the branch was replaced, introduced or removed.

The category buttons filters ledger entries by Added, Removed or Changed. Choosing Removed will not reveal the children of an object-to-string replacement: that replacement belongs to Changed. If the ledger says No matching values, choose another filter. The totals still describe the complete comparison, rather than just the selected category.

Inspect a shortened value without assuming data was skipped

Each result displays its complete formatted original and updated values. Read the whole branch when assessing a replacement. The readable path and JSON Pointer identify the same location; neither implies that all descendants are separate changes.

Return to the input text to inspect the rest. Export report saves complete values and paths as a local JSON download. Keep the original documents available outside the tab before replacing either input, because working data is held only in tab memory. A shortened preview should prompt a closer look at the source, rather than a conclusion that the unseen portion is unchanged.

Make a focused follow-up comparison deliberately

When both documents contain a corresponding smaller value, manually copy that complete JSON value from each source into Before and After. For example, compare the two delivery objects alone to concentrate on their fields. There is no automatic branch extraction control. Select Compare JSON again after pasting; edits mark the previous result stale.

Keep a note of the original location. Paths in the focused comparison start from the new inputs, so /method now refers to what was /delivery/method. If you compare the old delivery object directly with the new string, the replacement still produces one Changed entry, now shown as $ with an empty JSON Pointer. Narrowing the input does not make the tool compare children across different types.

AI-assisted ForgeHub editorial. App capabilities were checked against its implementation; this guide is not an independent review.

Frequently asked questions

Can I make a replacement list every old child as Removed?

There is no control for that behavior in this version. When the two values have different types, comparison records one Changed entry at their shared location and stops descending into that branch.

Does swapping sides turn a Changed object into Removed?

No. After Swap sides, compare again. An object-to-string replacement becomes string-to-object and remains Changed. A branch present on only one side switches between Added and Removed.

Will selecting a filter change the difference total?

No. Filtering selects which existing entries appear in the ledger. The total and category counts are calculated when the comparison runs and remain counts for the full result.

How can I inspect the complete changed value?

The canonical app displays complete formatted values. Export report also saves complete changed values in a local JSON file. Keep the source documents to review context outside the changed branch.