Registry / serialization / jsonata-python

jsonata-python

JSON →
library0.6.2pypypi✓ verified 33d ago

jsonata-python is a pure Python implementation of the JSONata query and transformation language, currently at version 0.6.2. It aims to provide 100% of the language features of JSONata without external dependencies, offering a performant alternative to Python libraries that rely on JavaScript bindings. The library maintains a steady release cadence with updates reflecting the upstream JSONata specification.

serializationdata
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

from jsonata import Jsonata

This quickstart demonstrates how to define a JSONata expression and apply it to a Python dictionary using the jsonata-python library. It calculates the sum of 'value' fields within a nested array.

import jsonata data = {"example": [{"value": 4}, {"value": 7}, {"value": 13}]} expr_str = "$sum(example.value)" expr = jsonata.Jsonata(expr_str) result = expr.evaluate(data) print(f"JSONata expression: {expr_str}") print(f"Input data: {data}") print(f"Result: {result}")
Debug
Known footguns
gotchaJSONata date/time functions that utilize ISO 8601 formats are only fully supported when running on Python 3.11 or newer. Users on older Python versions (3.10 and below) may experience issues or limited functionality with these specific date/time operations.
gotchaThis 'jsonata-python' library is a pure Python implementation. Older Python wrappers for JSONata, such as 'jsonata-wrapper' or 'pyjsonata', often relied on JavaScript bindings and may have different APIs, performance characteristics, and potential compatibility issues. Ensure you are importing from 'jsonata' if you intend to use this pure Python version.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
0 hits · last 30 days

No traffic data recorded yet.

Resources