Registry / serialization / jsonpath-rfc9535

jsonpath-rfc9535

JSON →
library1.0.0pypypi✓ verified 83d ago

jsonpath-rfc9535 is a Python library that provides a comprehensive and compliant implementation of JSONPath, as defined by RFC 9535. It allows users to query and manipulate JSON data structures using standard JSONPath expressions. The library is currently at version 1.0.0 and maintains an active development cadence with regular updates.

pip install jsonpath-rfc9535
INSTALL
IMPORT
SIG · JSONPATH-RFC9535
J
jsonpath-rfc9535
serializationpythonv1.0.0
Install
2.3s avg
Import
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 21.8MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.3s · import 0.000s · 22MB
20MB installed
● package 20MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

JSONPathEnvironment
from jsonpath_rfc9535 import JSONPathEnvironment
from jsonpath import JSONPath
find
from jsonpath_rfc9535 import find
compile
from jsonpath_rfc9535 import compile

Demonstrates how to import JSONPath, define a JSONPath expression, and use it to find matching nodes in a JSON document.

from jsonpath import JSONPath data = { "store": { "book": [ { "category": "fiction", "author": "Herman Melville", "title": "Moby Dick", "isbn": "0-553-21311-3", "price": 8.99 }, { "category": "fiction", "author": "J.R.R. Tolkien", "title": "The Lord of the Rings", "isbn": "0-395-19395-8", "price": 22.99 } ], "bicycle": { "color": "red", "price": 19.95 } } } # Find all book titles path = JSONPath("$.store.book[*].title") for node in path.findall(data): print(node.value) # Find books cheaper than 10 path_cheap_books = JSONPath("$.store.book[?(@.price < 10)]") for node in path_cheap_books.findall(data): print(node.value)
Debug
Known issues
breakingIn version 1.0.0, the `JSONPathNode.value` attribute was changed to a property with a setter. Assigning a new value to `node.value` will now modify the original source JSON data structure. In previous versions, `value` was read-only.
fix
If you relied on `JSONPathNode.value` being immutable or read-only, be aware of this change. For v1.0.0+, explicitly copy the `node.value` if you need to modify it without affecting the source, or use the setter knowingly to update the source.
affects: 1.0.0+
gotchaEarly versions (pre-1.0.0) had several bug fixes related to parsing complex filter expressions, escape sequences, number literals, and bracketed segments. Using older versions with complex or malformed JSONPath queries could lead to `JSONPathSyntaxError` or incorrect results.
fix
Always ensure you are using the latest stable version of `jsonpath-rfc9535` to benefit from parsing improvements and bug fixes, ensuring better RFC 9535 compliance and robustness.
affects: <1.0.0
gotchaThe `search()` and `match()` functions validate I-Regexp patterns according to RFC 9485. If an invalid pattern is provided, these functions will return `_LogicalFalse` instead of raising an exception. This behavior was introduced in v0.1.2.
fix
When using `search()` or `match()`, always check for the `_LogicalFalse` return value if the pattern might be invalid. Ensure your regular expressions comply with I-Regexp as specified in RFC 9485.
affects: 0.1.2+
Upgrade
Version history
1.0.0latest on PyPI · released Nov 30, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
2
Meta
1
Resources
jsonpath-rfc9535 — pip install jsonpath-rfc9535 · libregistry