larzjson
Friendly JSON with human errors.
Most JSON parsers give an error that stops beginners cold. larzjson is a real from-scratch parser that names the exact character position a parse failed at, summarises a document's structure in plain English, and fetches nested values by a dotted path - a learning-and-debugging layer.
larzscript pkg install json
What you get
- Errors that point at the exact spot
- summarize() the structure in English
- get(data, 'a.b.0') dotted paths
- pretty-print + validate
Try it
import "json" as json
let data = json.parse("{\"a\": [1, 2, 3], \"ok\": true}")
print(data["a"][1])
print(json.stringify(data))
print(json.get(data, "a.0", nil))
print(json.summarize(data))
print(json.validate(data, {"a": "list", "ok": "bool"}))Output
2
{"a":[1,2,3],"ok":true}
1
object with 2 keys: a (array of 3 items), ok (boolean)
[]Why it's in the Larz Stack
larzjson is a real Larzscript package (larzscript pkg install json) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.