ZON vs TOON
ZON vs TOON
ZON (Zero Overhead Notation) and TOON (Table Object Object Notation) are both modern data formats designed to be more efficient than JSON for Large Language Models (LLMs). However, ZON introduces several architectural improvements that result in significantly better token efficiency while maintaining the same high retrieval accuracy.
At a Glance
| Feature | ZON | TOON | Advantage |
|---|---|---|---|
| Token Efficiency | High (30-40% savings vs JSON) | Moderate (10-20% savings vs JSON) | ZON saves ~25% more tokens than TOON |
| Retrieval Accuracy | 100% | 100% | Tie |
| Syntax Style | Tabular/Minimalist | Structured/Verbose | ZON is cleaner |
| Parsing Speed | Fast (Stream-ready) | Moderate | ZON |
Token Efficiency Comparison
Benchmarks across multiple datasets and tokenizers (GPT-4o, Claude 3.5, Llama 3) consistently show ZON outperforming TOON.
Unified Benchmark (Mixed Data)
| Tokenizer | ZON Tokens | TOON Tokens | Difference |
|---|---|---|---|
| GPT-4o | 513 | 614 | ZON is 16.4% more efficient |
| Claude 3.5 | 548 | 570 | ZON is 3.9% more efficient |
| Llama 3 | 696 | 784 | ZON is 11.2% more efficient |
Large Complex Nested Dataset
For complex, real-world data structures, the gap widens significantly:
| Tokenizer | ZON Tokens | TOON Tokens | Difference |
|---|---|---|---|
| GPT-4o | 143,661 | 224,940 | ZON is 36.1% more efficient |
| Claude 3.5 | 145,652 | 196,893 | ZON is 26.0% more efficient |
| Llama 3 | 230,838 | 314,824 | ZON is 26.7% more efficient |
[!IMPORTANT] On large datasets, ZON saves ~25-35% more tokens than TOON. This directly translates to lower API costs and faster latency.
Retrieval Accuracy
Both formats are designed to be unambiguous for LLMs. In our benchmarks using gpt-5-nano on Azure OpenAI, both achieved perfect scores.
- ZON: 99% Accuracy (306/309 questions)
- TOON: 99% Accuracy (306/309 questions)
The Difference: ZON achieves this accuracy with significantly fewer tokens.
Why ZON Wins
1. Tabular Encoding for Arrays
TOON often repeats keys or uses verbose structures for lists of objects. ZON switches to a highly efficient tabular format for arrays, eliminating repetitive keys entirely.
TOON:
{
"context": {
"task": "Our favorite hikes together",
"location": "Boulder",
"season": "spring_2025"
},
"friends": ["ana", "luis", "sam"],
"hikes": [
{
"id": 1,
"name": "Blue Lake Trail",
"distanceKm": 7.5,
"elevationGain": 320,
"companion": "ana",
"wasSunny": true
},
{
"id": 2,
"name": "Ridge Overlook",
"distanceKm": 9.2,
"elevationGain": 540,
"companion": "luis",
"wasSunny": false
},
{
"id": 3,
"name": "Wildflower Loop",
"distanceKm": 5.1,
"elevationGain": 180,
"companion": "sam",
"wasSunny": true
}
]
}
TOON:
context:
task: Our favorite hikes together
location: Boulder
season: spring_2025
friends[3]: ana,luis,sam
hikes[3]{id,name,distanceKm,elevationGain,companion,wasSunny}:
1,Blue Lake Trail,7.5,320,ana,true
2,Ridge Overlook,9.2,540,luis,false
3,Wildflower Loop,5.1,180,sam,true
ZON:
context.task:Our favorite hikes together
context.location:Boulder
context.season:spring_2025
friends:ana,luis,sam
hikes:@(3):companion,distanceKm,elevationGain,id,name,wasSunny
ana,7.5,320,1,Blue Lake Trail,T
luis,9.2,540,2,Ridge Overlook,F
sam,5.1,180,3,Wildflower Loop,T
2. Minimal Syntax Overhead
ZON removes unnecessary punctuation like braces {}, brackets [], spaces and commas , where they aren't strictly needed for parsing, relying on indentation and whitespace similar to YAML but without the ambiguity.
3. Stream-First Design
ZON is designed to be parsed byte-by-byte, making it ideal for streaming responses from LLMs. Its structure allows parsers to build objects incrementally without waiting for closing delimiters.
Conclusion
While TOON is a solid improvement over JSON, ZON represents the next generation of efficiency. It provides the same 100% retrieval accuracy but with a massive 25-35% reduction in token usage for complex data, making it the superior choice for high-volume LLM applications.
