Open source · SEO & Search

Structured Data Diff Checker

Compare JSON-LD graphs between releases and report changed entities.

v1.0.0 · Node.js 22+ · MIT

Browse the public repository · View releases

Compare two local, bounded JSON-LD graph exports by stable @id. It reports added/removed entities and changed types, scalar fields and @id relationships. Object-key and unordered-value order do not produce differences. The tool is offline, read-only, zero-dependency Node.js 22+.

This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+; inspect the source before using it on your own files.

Run the checked-in example

node bin/structured-data-diff-checker.mjs --root examples/pass --before before.json --after after.json --contexts contexts.json
node bin/structured-data-diff-checker.mjs --root examples/fail --before before.json --after after.json --contexts contexts.json
npm run check

Read the result

The first example exits 0 and the second exits 1 with entity-removed. A remote context URI is used only if it has an explicit local mapping; it is never fetched. This implements the documented controlled JSON-LD subset, not full JSON-LD expansion. Unsupported constructs yield incomplete rather than a guessed diff. src/index.mjs exports TOOLID and compareGraphs.

Where this check stops

This local walkthrough does not establish the state of a live production system or replace the limits documented in the repository.

Before adapting the command to your own workflow, review the accepted inputs, exit codes and safety boundaries in the README.

Compiled with AI assistance from checked-in public documentation and example scripts. Run the example and review the repository's current documentation before relying on its result.