This project is a branch of jiter on QPython.
This is a standalone version of the JSON parser used in pydantic-core. The recommendation is to only use this package directly if you do not use pydantic.
Examples
The main function provided by Jiter is from_json(), which accepts a bytes object containing JSON and returns a Python dictionary, list or other value.
from jiter import from_json
json_data = b'{"name": "John", "age": 30}'
parsed_data = jiter.from_json(json_data)
print(parsed_data) # Output: {'name': 'John', 'age': 30}
Handling Partial JSON
Incomplete JSON objects can be parsed using the partial_mode= parameter.
import jiter
partial_json = b'{"name": "John", "age": 30, "city": "New Yor'
# Raise error on incomplete JSON
try:
jiter.from_json(partial_json, partial_mode=False)
except ValueError as e:
print(f"Error: {e}")
# Parse incomplete JSON, discarding incomplete last field
result = jiter.from_json(partial_json, partial_mode=True)
print(result) # Output: {'name': 'John', 'age': 30}
# Parse incomplete JSON, including incomplete last field
result = jiter.from_json(partial_json, partial_mode='trailing-strings')
print(result) # Output: {'name': 'John', 'age': 30, 'city': 'New Yor'}
Metadata
Release files for jiter-qpython 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jiter_qpython-0.7.0.tar.gz | 360.7 kB | Without provenance | Details for jiter_qpython-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jiter_qpython-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for jiter_qpython-0.7.0-py3-none-any.whl |
Total release size: 721.2 kB
Release files / jiter_qpython-0.7.0.tar.gz
| Download URL | jiter_qpython-0.7.0.tar.gz |
|---|---|
| Size | 360.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
456e9fd0838dd20f6f0ac5aa4a01a7be95048ba0885026ba7001eb135e8c350e
|
|
BLAKE2b-256 checksum How to use checksums |
b40442b08d46cb4979cd7315df7e21671a8db5e202419b9c19b3c21ffc2fca1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.7
|
Release files / jiter_qpython-0.7.0-py3-none-any.whl
| Download URL | jiter_qpython-0.7.0-py3-none-any.whl |
|---|---|
| Size | 360.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5aceb00f128d5d4bb64e9487fa8f7c7678a395602306a5c100bf1080fcc64100
|
|
BLAKE2b-256 checksum How to use checksums |
4a2bccf518a8e8805367dfd3e7d390a5618ee66688234ae3e7b9d4ce1078cd39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.7
|
Security for jiter-qpython 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.