JDogo
Open playground

JDogo vs TOON

Both formats write a header once and rows of values. Here is where they differ, measured on the same 200 payloads with the same tokenizer.

The short version

JDogoTOON
Prompt tokens, 60 production payloads113,654163,049 (+43%)
Prompt tokens, all 200 cases609,460850,782 (+40%)
Gzipped, all 200 cases332 KB399 KB
Exact round trips, all 200 cases200192
Cases where TOON is smaller0 of 60
Models reading rows, correct answers313 of 444315 of 444

Tokens counted with cl100k (GPT-4). TOON is JToon 2.0.9, the official Java implementation of TOON spec v4.4. Every case is on the benchmarks page.

On TOON's own benchmark

TOON publishes one of its benchmark datasets as a data file: the top 100 GitHub repositories. scripts/toon_upstream_benchmark.py downloads it from TOON's repository at a pinned commit and counts it with the same tokenizer TOON uses (o200k). Our JSON and TOON counts reproduce TOON's published ones exactly.

Top 100 GitHub repositoriesTokensvs TOON
JSON, pretty (TOON's figure: 15,337)15,337+71.6%
JSON, compact (11,640)11,640+30.2%
TOON (8,937)8,937baseline
CSV, TOON's figure8,711−2.5%
JDogo8,233−7.9%

This dataset is flat and full of unique text, which leaves less to remove than the mixed payloads above, so the margin is smaller. JDogo still beats TOON and CSV, and decodes back exactly.

Where JDogo pulls ahead

Where they're even

When a model reads rows directly, accuracy is about the same in JSON, TOON and JDogo: 309, 315 and 313 correct of 444 across six models. Neither format makes models smarter. JDogo gets there with the smallest prompt: 12,147 tokens across those runs, against 18,109 for TOON and 20,941 for JSON.

Where TOON is a fine choice

Switching from TOON

Decode your TOON with its library, then write JDogo with dumps, stringify or DocCodec.encode. JDogo readers also accept plain JSON, so services can move one at a time. Try your own payload in the playground: it shows JDogo and TOON side by side, with an exact round-trip check for each.