pypi / jsonpath-ng
jsonpath-ng
What changed in jsonpath-ng 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.
25 breaking11 deprecations9 new APIs and options5 performance3 behavior and defaults3 tooling26 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initjsonpath-ng 182 changes
Breaking changes 25
Parsing an unquoted `
*now produces aWildcard()node instead ofFields('*')orSlice()`; finding, updating, and filtering results are unchanged.A quoted `
*is treated as a field name, soparse("$['*']").find(data)` returns only the value of that field.Empty slices now select nothing from non-array values, including during updating and filtering; use `
[*]` to select object members.The CLI now prints matches as valid JSONL, so its output can be re-parsed as JSON.
Query serialization now quotes field names beginning with @ unless @ is followed by a letter or underscore.
Strings are no longer speculatively coerced to integers in filter comparisons, so numeric strings no longer match integer literals.
A slice with a step size of 0 now returns an empty list, aligning with RFC 9535.
Filtering by array index ignores out-of-range indices and non-array values, and queries selecting several indices remove exactly the selected elements.
Inside a filter, $ now resolves to the root node instead of acting as an alias for @, which refers to the element being tested.
An index applied to a string or scalar now matches nothing, rather than finding characters or raising TypeError.
Slices now find nothing unless applied to an array.
The wildcard no longer coerces scalars or objects into arrays; it finds object member values and array elements, and nothing from a scalar.
When used as a field, the wildcard now finds array elements as well as object member values; update() and filter() also act on those array elements.
Booleans are no longer treated as numbers: a boolean is never equal to a number.
Filters can compare against JSON null; unquoted null no longer matches the string "null", and comparisons with null no longer raise TypeError for relational operators.
Project metadata now restricts installation to supported Python versions.
Serialization no longer surrounds
Childpaths with parentheses.Applying
Index.findto a dict no longer raisesKeyError; it matches nothing.Negative indices beyond the start of an array return no matches, like out-of-range positive indices.
Python 3.15 is supported, and Python 3.10 support is dropped.
ExtentedJsonPathParser has been renamed.
Pickle support is removed from the vendored copy of ply to resolve CVE-2025-56005.
The ply dependency is removed.
Python 3.13 and 3.14 are supported; Python 3.8 and 3.9 are no longer supported.
Serialization is adjusted to enforce roundtrip parsing consistency; fields are more conservatively enclosed in quotation marks.
Deprecations 11
Interpreting `
Fields('*')as a wildcard is deprecated; replace usages withWildcard()`.Interpreting `
Slice()with no parameters as a wildcard is deprecated; replace usages withWildcard()`.Parsing unquoted words as comparison operands in filter selectors is deprecated; quote strings instead.
The union operator between paths issues a DeprecationWarning and is scheduled for removal in version 2.0.0.
The intersection operator between paths issues a DeprecationWarning and is scheduled for removal in version 2.0.0.
The logical AND operator in filters issues a DeprecationWarning; use && instead.
The Union and Intersect classes issue a DeprecationWarning when accessed and are scheduled for removal in version 2.0.0.
Instantiating Filter with no expressions is deprecated and will raise an exception in version 2.0.0.
The debug parameter for lexer and parser instantiation is deprecated and has no effect; remove it from instantiation sites.
ExtentedJsonPathParser is deprecated; use ExtendedJsonPathParser instead.
The __version__ attribute is deprecated; use importlib.metadata.version("jsonpath-ng") to get the package version.
New APIs and options 9
Adds a node that selects every child of an object or array.
The CLI can now be run as a Python module.
RFC 9535 logical operators are supported in filters; && binds more tightly than ||, and parentheses group expressions.
Serialized filters can be parsed again; this becomes @, strings are single-quoted, and & becomes &&.
Extended filter expressions now support negating relative existence queries.
Indices can be comma-separated.
DatumInContext supports in-place updating.
Operation instances support equality checking.
Union and Intersect instances support string serialization.
Performance 5
The split extension no longer takes quadratic time to reject malformed definitions.
The sub extension no longer takes quadratic time to reject malformed definitions.
Removing array elements with Slice.filter() no longer takes quadratic time.
Runtimes now scale linearly with the depth of the data.
Pre-generated PLY lex/parse tables make parser instantiation and parsing faster, and allow downstream projects to run with Python optimizations enabled.
Behavior and default changes 3
Filter comparisons can now use a query on the right-hand side, starting with @ or $ and containing only name and index segments.
The extended parser now allows true and false as field names while continuing to treat them as boolean literals on the right-hand side of filter comparisons.
EMOJI and CJK Unicode are supported.
Tooling 3
Type annotations were added to many JSONPath interfaces.
Add a PEP 561 marker so the package can be recognized as typed.
Typing is provided for IDE autocomplete.
Fixes and other changes 26
The CLI code is relicensed under Apache 2.0; the notes state relicensing is allowed under the previous license.
Pre-generated PLY tables are now explicitly imported so PyInstaller bundles them, fixing ModuleNotFoundError failures in frozen apps.
Filter comparisons with literals now handle string and integer values and missing target paths correctly.
Ordering values of different types in a filter no longer raises a TypeError.
Slice.filter() no longer removes the wrong elements from an array.
Index updates are skipped for non-list inputs and out-of-range array indices.
A filter following `
..` now parses and selects every matching array element or object member value at any depth.Paths using `
..` no longer raise RecursionError when applied to deeply nested data, though very long JSONPath expressions can still raise it.Fixes a TypeError crash that can occur when filtering scalar values with a Filter instantiated without expressions.
Equality against an integer literal no longer truncates float values when matching.
Evaluating extended filter expressions no longer mutates dictionaries.
Field names starting with
trueorfalseare handled correctly.Hashing an
Indexinstance no longer raisesAttributeError.str()now works for anIndexwith comma-separated indices.Updating named fields ignores non-mapping values instead of raising
TypeError.Slice serialization preserves omitted bounds and step values correctly.
An in-place callback returning
Noneno longer overwrites the field withNone.The bool filter type now handles None values.
Serialization preserves Child precedence using parentheses so strings such as
a..b[c]re-parse identically.A fix addresses handling of False and None values.
The field filter resolves a wildcard path issue.
Parsing and string serialization of numeric-only identifiers are fixed;
10no longer parses as two separate fields.Operation instances can now be serialized, fixing serialization of
0-@andA -A.A fix addresses the single constant case.
Equality checks for SortedThis instances are fixed.
SortedThis instances can be serialized and re-parsed, fixing serialization of
0[/0].