skillfed

jsonpath-rfc9535

RFC 9535 - JSONPath: Query Expressions for JSON in Python

jsonpath-rfc9535 v1.0.0 483.7K downloads/30d#6,411 on PyPI9
Permissive license MIT AGING released

What it is and what it does

jsonpath-rfc9535 is a Python implementation of RFC 9535, the standardized JSONPath specification for querying JSON data. It provides a strict, standards-compliant way to extract values from nested JSON structures using path expressions similar to XPath for XML. The package exports a simple API: find() to get all matches, find_one() for the first match, and finditer() for lazy iteration. Each matched node carries its value, normalized path location, and parent reference, allowing you to both read and mutate data in place.

The implementation depends on iregexp-check and regex for expression evaluation. It supports Python 3.8 through 3.14 on both CPython and PyPy, and has been tested against the JSONPath Compliance Test Suite to ensure RFC adherence. The package is lightweight (pure Python wheel), carries no known vulnerabilities, and is distributed under the permissive MIT license.

Use it for:

  • Extract specific fields from deeply nested JSON API responses without manual traversal.
  • Filter array elements in JSON documents using query expressions (e.g., find users with score > 85).
  • Compile and reuse a JSONPath query against multiple JSON-like data structures for efficiency.
  • Read and mutate JSON values in place by assigning to matched node.value properties.
  • Process JSON loaded from files or YAML sources using a single, standards-compliant query language.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Queries JSON data using RFC 9535 JSONPath expressions, returning matched values with their locations and parent references.

Yes, if you need RFC 9535–compliant JSONPath queries. The package is lightweight, well-licensed, has no known vulnerabilities, and supports modern Python versions. However, note the 257-day gap since last release—maintenance appears inactive, so consider this if you need active bug fixes or feature development. For standards-compliant querying of JSON data, it is a solid choice.

Install

jsonpath-rfc9535 on PyPI

pip

pip install jsonpath-rfc9535

uv

uv add jsonpath-rfc9535

poetry

poetry add jsonpath-rfc9535

Installing jsonpath-rfc9535

Before you install

Low friction: pure Python wheel with only two runtime dependencies (iregexp-check and regex). Last commit was recent, though the project shows aging maintenance status with no activity for 257 days since the last release.

License in practice

MIT license permits commercial and private use with minimal restrictions—you may use, modify, and distribute the package freely provided you include the license notice.

Quickstart

pip install jsonpath-rfc9535

import jsonpath_rfc9535 as jsonpath

data = {"users": [{"name": "Sue", "score": 100}]}
for node in jsonpath.find("$.users[?@.score > 85]", data):
    print(node.value)

Verify before relying

  • Performance characteristics when querying very large JSON documents or complex nested structures.
  • Stability and bug-fix cadence given the 257-day gap since last release despite aging status.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 2 — iregexp-check, regex
Maintenance aging — 257 days since the last release
Last repo commit
First released
Downloads 483,653/month — #6,411 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: jsonpath_rfc9535-1.0.0-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

jsonpath query jsonrfc 9535 jsonpathjson path expressionsquery nested json datajson selector filterjsonpath compliancejson data extraction
json-queryrfc-9535data-extraction

More Text Processing packages