json5-document
A typed JSON5 parser that preserves comments, tokens, and source spans. It requires Python 3.12 or newer and has no runtime dependencies.
Installation
pip install json5-document
Usage
"""Parse JSON5 while preserving source comments."""
import json5_document
source = "// heading\n{count: 2,}"
document = json5_document.parse(source=source)
assert document.value == {"count": 2}
assert document.comments[0].text == "// heading"
assert document.to_source() == source
Use loads(source=...) when only Python values are needed. See the documentation for the full API and parsing policies.
Metadata
Release files for json5-document 2026.10.15.1
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 |
|---|---|---|---|---|
| json5_document-2026.10.15.1.tar.gz | 35.8 kB | With provenance | Details for json5_document-2026.10.15.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| json5_document-2026.10.15.1-py3-none-any.whl | Python 3 | none | any | Details for json5_document-2026.10.15.1-py3-none-any.whl |
Total release size: 46.1 kB
Release files / json5_document-2026.10.15.1.tar.gz
| Download URL | json5_document-2026.10.15.1.tar.gz |
|---|---|
| Size | 35.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4775b2013c744a412c18ce9b40969deeb6b2e7df514f8c7d5f374673a9ba4922
|
|
BLAKE2b-256 checksum How to use checksums |
7ce4ed48d6868fb633cea8eb2422926f4b0a7600d996e7a9ad8ad317af4c22db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logRelease files / json5_document-2026.10.15.1-py3-none-any.whl
| Download URL | json5_document-2026.10.15.1-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24168c7fbe44c4bc55f940c756299f8fa622f4f25d96d54c3ee748aad407bbda
|
|
BLAKE2b-256 checksum How to use checksums |
5255184c9140ff95aa0e4a065d85266db9098427efe174979fb108e7af3cb8a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logSecurity for json5-document 2026.10.15.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for json5_document-2026.10.15.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logA 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.