pypi / jsonpath-ng
jsonpath-ng
What changed in jsonpath-ng 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-21.
8 breaking1 deprecations1 performance2 behavior and defaults1 tooling4 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initjsonpath-ng 117 changes
Breaking changes 8
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.
Deprecations 1
Instantiating Filter with no expressions is deprecated and will raise an exception in version 2.0.0.
Performance 1
Runtimes now scale linearly with the depth of the data.
Behavior and default changes 2
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.
Tooling 1
Type annotations were added to many JSONPath interfaces.
Fixes and other changes 4
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.