Download Latest Version v2.3.0 source code.tar.gz (164.7 kB)
Email in envelope

Get an email when there's a new version of JSON diff and patch

Home / v2.3.0
Name Modified Size InfoDownloads / Week
Parent folder
jd-arm64-windows.exe 2025-08-12 17.0 MB
jd-arm64-darwin 2025-08-12 17.1 MB
jd-arm64-linux 2025-08-12 17.0 MB
jd-amd64-windows.exe 2025-08-12 17.5 MB
jd-amd64-darwin 2025-08-12 17.4 MB
jd-amd64-linux 2025-08-12 17.4 MB
README.md 2025-08-12 3.7 kB
v2.3.0 source code.tar.gz 2025-08-12 164.7 kB
v2.3.0 source code.zip 2025-08-12 206.8 kB
Totals: 9 Items   103.8 MB 1

PathOptions

This release introduces PathOptions, a powerful new feature that enables precise control over how different parts of your JSON/YAML data are compared. PathOptions allow you to
apply different comparison semantics to specific paths within your data structures, giving you fine-grained control over diff behavior.

Key Features:
- Targeted comparison options: Apply SET, MULTISET, precision, or setkeys options to specific paths using the syntax {"@":["path","to","target"],"^":[options]}
- Path isolation: Options only affect their specified paths and don't leak globally, allowing you to mix different comparison semantics in the same diff
- Enhanced array dispatch: Fixed critical bug where PathOptions with empty paths (root level) weren't being applied correctly for array dispatch
- Comprehensive documentation: Complete v2 Diff Language guide with new EBNF grammar, PathOption integration examples, and updated CLI help showing flag equivalents
- Extensive test coverage: Added 24 test cases demonstrating PathOption functionality across various data structures and edge cases

Examples:

Apply SET semantics to specific array while others remain lists

jd -opts='[{"@":["tags"],"^":["SET"]}]' a.json b.json

Multiple PathOptions with different semantics

jd -opts='[{"@":["items"],"^":["SET"]}, {"@":["price"],"^":[{"precision":0.01}]}]' a.json b.json

This release maintains full backward compatibility while adding powerful new capabilities for sophisticated diff control scenarios.

What's Changed

New Contributors

Full Changelog: https://github.com/josephburnett/jd/compare/v2.2.7...v2.3.0

Source: README.md, updated 2025-08-12