Structured Data Diff

How to compare JSON, YAML and Plist with a semantic diff

Text diff is noisy when structured files are reformatted, reordered or converted between formats. CodeSwissKnife Structured Data Diff compares data by meaning, reports deterministic normalized paths and keeps the whole comparison local on your Mac.

CodeSwissKnife Structured Data Diff showing added, removed and modified values between structured documents.

Why a semantic diff beats a text diff for structured data

A text diff is useful for prose and source code, but it can become noisy for API payloads and configuration files. Formatting changes, key reordering and equivalent cross-format data can hide the one field that actually changed.

Structured Data Diff parses both sides first, then compares the data model. The result is a list of meaningful changes instead of a line-by-line fight with whitespace.

Compare JSON, YAML and property lists

The tool accepts JSON, YAML and XML or binary property-list content independently on either side. Format auto-detection can be used when you do not want to choose manually.

That means you can compare a JSON API response to a YAML configuration, or inspect changes in macOS property lists without converting everything first.

Read changes by normalized path

Changes are reported with deterministic normalized paths and grouped as added, removed, modified or type-changed. Object formatting and key order are ignored, so reordered objects do not become fake changes.

Numeric values are compared semantically while preserving important fidelity for very large JSON numbers. The goal is to show what changed, not what merely moved in a text editor.

Reduce array reorder noise

Arrays can be compared by index, by an explicit scalar key, or by automatic unique keys such as id, name, key or uuid. This helps with API payloads, deployment manifests and generated configuration where rows may move but identities stay the same.

Ignore rules support exact paths, recursive fields such as ..updatedAt, and * or ? globs. That keeps timestamps, generated ids and known-noisy fields out of the comparison.

Export RFC 6902 JSON Patch when it is safe

For two JSON inputs compared by index, Structured Data Diff can export an applicable RFC 6902 JSON Patch. Patch export is intentionally unavailable for cross-format input, keyed-array matching or truncated results, where a patch could misrepresent what is shown.

Both inputs stay memory-only and are capped for safety. Parsing and recursive comparison run off the main thread, with guarded stale results and virtualized change lists for large outputs.

Compare structured files locally

Use CodeSwissKnife to compare JSON, YAML and property lists by meaning, with normalized paths and patch export when the comparison supports it.