JSON diff and patch

JSON Diff and Patch is a command-line tool and Go library that compares JSON or YAML values, highlights added, changed, and removed data, and creates patches…

  • Development
  • Tools & Utilities
JSON Diff and Patch is a command-line tool and Go library that compares JSON or YAML values, highlights added, changed, and removed data, and creates patches for developers and operators to apply those changes reliably.

Platform availability

Available on 0 of 10 platforms

  • Unraid (not listed)
  • TrueNAS (not listed)
  • Umbrel (not listed)
  • ZimaOS (not listed)
  • Proxmox (not listed)
  • Helm (not listed)
  • Mac (not listed)
  • Windows (not listed)
  • Linux (not listed)
  • Any server (not listed)

Health score?A 0-100 score computed nightly from four factors: maintained (40%: recent commits and steady activity), popular (25%: GitHub stars, log scale), easy to install (20%: platforms, install notes, setup guides, Docker image) and light to run (15%: minimum RAM, ARM support). When the source code has been checked, a fifth factor, security check (20%: automated scan for committed secrets, unsafe desktop-app settings, known-vulnerable dependencies and project hygiene; any serious finding caps it at 20), is added. Factors without data are left out and the rest are rescaled.

53/100 Fair

Maintained
46last commit 265 days ago
Popular
672,304 GitHub stars
Easy to install
250 install platforms, install notes, Docker image
Light to run
No data
Security check
79no serious findings, CI, tests, OpenSSF Scorecard 4.8/10

Based on 4 of 5 factors.

GitHub stars
2,304
Open issues
21
Last commit
2026-03-01
Latest release
v2.5.0
License
MIT
Activity
stale

Checked yesterday - source: GitHub (josephburnett/jd)

Resources & Compatibility

ARM (e.g. Raspberry Pi) is not supported.

Checked 54 days ago - source: Docker Hub image tags and published docs

First-install notes

  • Install the v5 terminal tool Run the Go command go install github.com/evanphx/json-patch/v5/cmd/json-patch to install the v5 json-patch terminal tool with the newer extra features. If you skip this step, the json-patch command will not exist and you cannot apply patches. source
  • Test with the example files Before using your own data, run the documented example with a small JSON document and patch files. This catches bad JSON or wrong patch paths early, because those errors can make the command fail without changing anything. source
  • Double-check patch paths Each patch operation points to a place in your JSON, such as a field name or array position, and a missing place can make the patch fail. If you expect some fields to be absent, use the documented setting that ignores missing paths in remove steps; otherwise the patch may stop instead of skipping that step. source

Fetched 53 days ago - each note links to its source

Alternatives

No alternatives collected yet.

Common questions

How do I run the built-in web UI on a custom port?

Run jd with -port=N to serve the web UI on port N. If building from source, use the Makefile to include the UI.

Can I use jd through Docker without installing the binary?

Yes. Run the josephburnett/jd image with the current directory mounted and pass your diff or patch arguments to it.

Can I compare YAML files instead of JSON?

Yes. Pass -yaml to read and write YAML instead of JSON.

How do I ignore array order or small numeric differences?

Use -set for arrays as sets or -mset for multisets, and use -precision=N or -opts for numeric tolerance. PathOptions can target specific paths.

How can I diff files in GitHub Actions and use the exit code?

Use the jd GitHub Action with the two files as args. The action exposes output and an exit code that you can test in a follow-up step.

Answers sourced from github.com

Community

Collected 48 days ago - public community threads