Releases: davidhoo/jsonpath
Releases · davidhoo/jsonpath
v3.0.0
v3.0.0 - 2026-05-07
Breaking Changes
Query()returnsNodeListinstead ofinterface{}- Each result is a
NodewithLocation(Normalized Path) andValue - See MIGRATION.md for upgrade guide
- Each result is a
match()syntax changed from method-style to function-style- Before:
@.field.match('pattern') - After:
match(@.field, 'pattern')
- Before:
search()signature changed to RFC 9535 semantics- Before:
search(array, pattern)- filtered array - After:
search(string, pattern)- returns boolean
- Before:
count()signature changed to RFC 9535 semantics- Before:
count(array, value)- counted value occurrences - After:
count(nodelist)- counts nodes - Old behavior moved to
occurrences()
- Before:
Added
value()function - extracts single value from nodelistoccurrences()function - counts value occurrences (non-standard)Node/NodeListtypes with Normalized Path supportNothingtype - represents absence of valueLogicalType- three-valued logic for filter expressions- I-Regexp parser and validator (RFC 9485)
- Normalized Path generator (RFC 9535)
- Benchmark tests for performance testing
- CLI
--pathflag for Normalized Path output
Changed
- 100% RFC 9535 compliance (703/703 tests passing)
- Correct operator precedence (
&&before||) - Recursive descent (
..) includes root node - Selectors return empty result on type mismatch instead of error
length()counts Unicode runes instead of bytes- Filter expressions support existence tests (
[?@.name]) - Filter expressions support bare
@reference - Comparison with null/boolean returns false instead of error
- Zero step in slice returns empty result instead of error
Fixed
- Nested filter expressions parsing
- Function calls in filter expressions
- Parenthesized expressions in filters
- Escaped quotes in filter strings
- Whitespace handling in various positions
- Unicode line separator matching
- Index validation (leading zeros, out of range, etc.)
- Name selector validation
- 32-bit platform compatibility
Installation
# Homebrew
brew tap davidhoo/tap
brew install jsonpath
# Go
go install github.com/davidhoo/jsonpath/cmd/jp@latestv2.1.0
v2.1.0 - 2026-05-06
Added
- Existence test
[?@.name]in filter expressions - Bare
@reference in filter expressions ($[?@>3]) - RFC 9535 test suite integration (703 test cases)
- Baseline pass rate tracking
Fixed
length()now counts Unicode runes instead of bytes- Operator precedence:
&&now has higher precedence than|| - Recursive descent (
..) now includes root node in results - Selectors return empty result on type mismatch instead of error
Installation
# Homebrew
brew tap davidhoo/tap
brew install jsonpath
# Go
go install github.com/davidhoo/jsonpath/cmd/jp@v2.1.0v2.0.1
v2.0.1 - 2025-01-03
Fixed
- Program waiting indefinitely when no input provided
- Added support for
--helpflag
Changed
- Refactored main logic to
run()function for better testability - Improved error handling mechanism
Installation
# Homebrew
brew tap davidhoo/tap
brew install jsonpath
# Go
go install github.com/davidhoo/jsonpath/cmd/jp@v2.0.1v2.0.0
v2.0.0 - 2024-12-16
Changed
- Complete rewrite with RFC 9535 compliance
- API changes to align with RFC specification
- Updated function signatures for better usability
- Modified error types for more detailed error reporting
Added
- Full implementation of JSONPath specification (RFC 9535)
- Enhanced error handling and reporting
- Improved performance and reliability
- Updated documentation with more examples
Installation
# Homebrew
brew tap davidhoo/tap
brew install jsonpath
# Go
go install github.com/davidhoo/jsonpath/cmd/jp@v2.0.0v1.0.4
v1.0.3
v1.0.3 - 2024-12-16
Added
- Full support for logical operators (
&&,||,!) - Proper handling of complex filter conditions
- Support for De Morgan's Law in negated expressions
- New simplified
Queryfunction - Examples demonstrating logical operators
Changed
- Deprecated
Compile/Executein favor ofQuery - Improved error handling and reporting
Installation
go install github.com/davidhoo/jsonpath/cmd/jp@v1.0.3v1.0.2
v1.0.2 - 2024-12-12
Added
- Enhanced filter expressions with logical operators
- Beautiful syntax highlighting for JSON output
- Colorful command-line interface
- Better UTF-8 support for CJK characters
Installation
go install github.com/davidhoo/jsonpath/cmd/jp@v1.0.2v1.0.1
JSONPath v1.0.0
v1.0.0 - 2024-12-12
Added
- Initial release
- Basic JSONPath query support
- Command-line tool implementation
Installation
go install github.com/davidhoo/jsonpath/cmd/jp@v1.0.0