Koru Ships Schema-Directed JSON Parser
Koru’s new std/json:parse generates a recursive-descent parser at comptime from a destructure, binding typed fields directly without building a DOM. The release also adds std/json:emit and reports roughly 20× faster reads than Koru’s yyjson document path. [Announcement](https://www.korulang.org/blog/json-parse-a-destructure-is-a-schema)
This is less a generic JSON-parser release than an aggressive bet that compile-time schema knowledge should erase runtime parsing abstractions. It is compelling for fixed HTTP envelopes, but intentionally trades away dynamic documents and long-lived parsed data.
- –The destructure acts as the schema, covering required and optional fields, nested objects, arrays, typed conversions, and validation.
- –Unknown keys are skipped but still validated, while malformed input returns an error branch with a byte offset.
- –Direct parsing and emission avoid DOM construction and document traversal, explaining the large benchmark advantage.
- –The comparison is strongest for schema-known payloads; the same-work serde benchmark shows a narrower 1.15×–1.8× lead.
- –Parsed strings and arrays live only for the branch scope, so persistent or mutable documents still require yyjson.
DISCOVERED
2h ago
2026-10-10
PUBLISHED
2h ago
2026-10-10
RELEVANCE
AUTHOR
korulang