JSON for Humans.
JSON is great. Until you miss that trailing comma... or want to use comments. What about multiline strings? JSONH provides a much more elegant way to write JSON that's designed for humans rather than machines.
Since JSONH is compatible with JSON, any JSONH syntax can be represented with equivalent JSON.
JsonhPy
JsonhPy is a parser implementation of JSONH V1 & V2 for Python 3.
Example
{
// use #, // or /**/ comments
// quotes are optional
keys: without quotes,
// commas are optional
isn\'t: {
that: cool? # yes
}
// use multiline strings
haiku: '''
Let me die in spring
beneath the cherry blossoms
while the moon is full.
'''
// compatible with JSON5
key: 0xDEADCAFE
// or use JSON
"old school": 1337
}
Usage
Everything you need is contained within JsonhReader:
from JsonhPy.JsonhPy import *
jsonh: str = """
{
this is: awesome
}
"""
element: object = JsonhReader.parse_element_from_string(jsonh).value()
Metadata
Release files for JsonhPy 2.9
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 |
|---|---|---|---|---|
| jsonhpy-2.9.tar.gz | 14.8 kB | Without provenance | Details for jsonhpy-2.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jsonhpy-2.9-py3-none-any.whl | Python 3 | none | any | Details for jsonhpy-2.9-py3-none-any.whl |
Total release size: 28.7 kB
Release files / jsonhpy-2.9.tar.gz
| Download URL | jsonhpy-2.9.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20fd7bc28985485aff6dd08d1c71099cc664c899d2b2890de7306af8f2cc0735
|
|
BLAKE2b-256 checksum How to use checksums |
6cd4b369ec8b9617ecd8c065a9682914ad6de7f0f989099daffe6d8a393ae389
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / jsonhpy-2.9-py3-none-any.whl
| Download URL | jsonhpy-2.9-py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f25d78a7f2ddade9b64bfb72365b7316c8b9243d19fa67671bc135239ea12216
|
|
BLAKE2b-256 checksum How to use checksums |
47e229192ce2665a578d4ffecb557d363bde964d854427351935adb0603814c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for JsonhPy 2.9
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.