Skip to main content

larzjson

Friendly JSON — human error messages, pretty-print, and plain-English structure.

The standard library parses JSON fine, but its errors ("Expecting ',' delimiter: line 3 column 9") stop beginners cold. larzjson wraps stdlib json to point at the exact spot with a caret, summarise a document's structure in plain English, and fetch nested values by a dotted path. A learning-and-debugging layer, zero third-party dependencies.

Install

pip install larzjson

Use

from larzjson import parse, pretty, validate, summarize, get

pretty('{"a":1,"b":[1,2]}')             # nicely indented
ok, msg = validate('{"a": 1,}')         # (False, message with a ^ under the ,)
summarize('{"name":"Ada","xs":[1,2]}')  # "An object with 2 keys: name (string); xs (list of 2)"
get({"user": {"scores": [90, 85]}}, "user.scores.0")   # 90

Learn to code with Larz

Part of the learn-to-code toolkit in the Larz stack — see the Learn to Code platform.

Tests

python -m unittest discover -s tests -v   # 10 tests

License

MIT (c) larz-scripter

Metadata

Release files for larzjson 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for larzjson 0.1.0
File Size Uploaded Provenance
larzjson-0.1.0.tar.gz 8.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for larzjson 0.1.0
File Interpreter ABI Platform
larzjson-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.9 kB

Release files / larzjson-0.1.0.tar.gz

Download URL larzjson-0.1.0.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fc35131fd6002030b4b2d2f94285493643c05bc403d20215907cfd766d8bd258
BLAKE2b-256 checksum
How to use checksums
6221eaae44452192204a4c8581367665fae6a60899b6ce75361331f17c15501e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / larzjson-0.1.0-py3-none-any.whl

Download URL larzjson-0.1.0-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55e44789261b820521cb0a9f30fc1fc412fce6544529f23588003e13b99e9fb4
BLAKE2b-256 checksum
How to use checksums
463581dae168b17b8215a838dd8cdba6a443a470b4e3bf3bd46e2fde65fe2c47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for larzjson 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page