A binary encoding for JSON, optimized for write-once / read-many workloads with selective path retrieval.
See spec.md for the format specification.
- jankdc/kahon-rs — Rust writer/encoder
Lives in ./conformance/*.json. Each vector pairs a JSON input or constructed file with the exact bytes a
conforming implementation must produce or reject.
Each manifest is a JSON array of vectors. Common fields:
{
"id": "category/short-name",
"description": "One-line summary",
"spec_refs": ["§4", "§5.2"],
"bytes_hex": "4B41484E 0100 ... 4B41484E"
}Fields by manifest:
- valid.json: adds
json_text(the JSON literal as a string - preserves textual distinctions like1vs1.0). - invalid.json: adds
must_reject: trueandreject_reason(cites the invariant or rule violated). - tolerated.json: adds
writer_compliant: false,reader_should_accept: true, and (when applicable)json_textplus aminimal_form_idcross-reference to the conforming encoding invalid.json. Forward-compatibility entries (e.g., Extension codes) have no JSON correspondence and may setjson_textandminimal_form_idtonull. - writer-rejects.json: omits
bytes_hex. Addsjson_text,writer_must_reject: true, andreject_reason(the §5/§11.2 rule violated).
bytes_hex is whitespace-tolerant; spaces are decorative. Strip
non-hex characters before parsing.