TOON
Serialization format that re-encodes JSON as indentation and tabular rows, so the model reads fewer tokens for the same content. A list of same-shaped objects declares its fields once in a header (`users[2]{id,name}:`), then each object takes one line, instead of repeating "id" and "name" for every element. Lossless: you can go back to JSON any time. MIT licence (`@toon-format/toon` library on npm, `@toon-format/cli` command-line tool).
Strengths
- Declares fields once per array: 58.7% fewer tokens than indented JSON on flat data (repository benchmark, o200k_base tokenizer)
- Equal or better accuracy: 72.2% against 71.4% for JSON across 244 questions and 4 models (repository benchmark)
- Lossless and readable: you can read it by eye and convert back to JSON with the library or the CLI (`cat data.json | npx @toon-format/cli --stats`)
Limitations
- Against already-compacted JSON the gain nearly vanishes on mixed data (+1.6%) and reverses on semi-uniform logs: the headline figure compares against indented JSON
- Overhead of about 5 to 10% for the declared lengths and fields, and latency not measured by the repository, which recommends testing it on local or quantized models
- Models do not all read it equally well: 57.0% accuracy for gpt-5.4-nano against 97.1% for grok-4.5 in the same benchmark. The format is stable, but "an idea in progress" in the repository's own words
Best for
- A dev who sends a model product catalogs, search results or database rows of the same shape on every request
- Someone paying input tokens by the API whose prompts are dominated by arrays of objects