JTON: A Token-Efficient JSON Superset with Zen Grid Tabular Encoding for Large Language Models
Abstract
When LLMs process structured data, the serialization format directly affects cost and context utilization. Standard JSON wastes tokens repeating key names in every row of a tabular array--overhead that scales linearly with row count. This paper presents JTON (JSON Tabular Object Notation), a strict JSON superset whose main idea, Zen Grid, factors column headers into a single row and encodes values with semicolons, preserving JSON's type system while cutting redundancy. Across seven real-world domains, Zen Grid reduces token counts by 15-60% versus JSON compact (28.5% average; 32% with bare_strings). Comprehension tests on 10 LLMs show a net +0.3 pp accuracy gain over JSON: four models improve, three hold steady, and three dip slightly. Generation tests on 12 LLMs yield 100% syntactic validity in both few-shot and zero-shot settings. A Rust/PyO3 reference implementation adds SIMD-accelerated parsing at 1.4x the speed of Python's json module. Code, a 683-vector test suite, and all experimental data are publicly available.
Figures & tables
| Rows | JSON Pretty | JSON Compact | Zen Grid | Zen Bare | vs Compact |
|---|---|---|---|---|---|
| 5 | 168 | 88 | 75 | 64 | 14.8% |
| 10 | 335 | 175 | 142 | 119 | 18.9% |
| 25 | 836 | 436 | 343 | 284 | 21.3% |
| 50 | 1,671 | 871 | 678 | 559 | 22.2% |
| 100 | 3,342 | 1,742 | 1,349 | 1,109 | 22.6% |
| 250 | 8,351 | 4,351 | 3,358 | 2,759 | 22.8% |
| Dataset | Rows | Cols | JSON Tokens | Zen Tokens | Savings |
|---|---|---|---|---|---|
| Employees | 100 | 4 | 1,742 | 1,349 | 22.6% |
| Employees | 500 | 4 | 8,702 | 6,709 | 22.9% |
| Products | 100 | 5 | 2,764 | 2,273 | 17.8% |
| Products | 500 | 5 | 13,838 | 11,347 | 18.0% |
| Metrics | 100 | 4 | 2,694 | 2,301 | 14.6% |
| Metrics | 500 | 4 | 13,472 | 11,479 | 14.8% |
| Dataset | Rows | JSON Compact | Zen Bare | Compact | Pretty |
|---|---|---|---|---|---|
| Twitter (API) | 20 | 3,673 | 1,422 | 61.3% | 65.9% |
| GitHub (Events) | 20 | 968 | 780 | 19.4% | 43.8% |
| CITM (Ticketing) | 20 | 871 | 612 | 29.7% | 52.6% |
| Financial (Trades) | 20 | 1,358 | 1,041 | 23.3% | 48.5% |
| Weather (Stations) | 25 | 1,911 | 1,316 | 31.1% | 52.3% |
| Healthcare (Lab) | 20 | 1,349 | 936 | 30.6% | 53.3% |
| Dataset | JSON (ms) | JTON (ms) | Speedup |
|---|---|---|---|
| 0.090 | 0.058 | 1.55 | |
| GitHub | 0.043 | 0.036 | 1.20 |
| CITM | 0.055 | 0.037 | 1.50 |
| Financial | 0.083 | 0.059 | 1.40 |
| Weather | 0.106 | 0.070 | 1.53 |
| Healthcare | 0.088 | 0.056 | 1.58 |
| Model | Family | JSON | Zen Grid | ||
|---|---|---|---|---|---|
| GPT-5.1-codex | OpenAI | 74.3% | 71.4% | 2.9 pp | 35 |
| GPT-5.1 | OpenAI | 71.4% | 62.9% | 8.6 pp | 35 |
| GPT-5-mini | OpenAI | 71.4% | 71.4% | 0.0 pp | 35 |
| Gemini 3 Pro | 68.6% | 68.6% | 0.0 pp | 35 | |
| Kimi K2 | Moonshot | 62.9% | 68.6% | +5.7 pp | 35 |
| Qwen3 32B | Alibaba | 60.0% | 57.1% | 2.9 pp | 35 |
| Question Type | JSON | Zen Grid | |
|---|---|---|---|
| Lookup | 95.7% | 95.7% | 0.0 pp |
| Filtering | 52.9% | 51.4% | 1.4 pp |
| Count | 51.4% | 48.6% | 2.9 pp |
| Comparison | 48.6% | 50.0% | +1.4 pp |
| Aggregation | 47.1% | 51.4% | +4.3 pp |
| Overall | 59.1% | 59.4% | +0.3 pp |
| Family | Models | JSON | Zen Grid | |
|---|---|---|---|---|
| OpenAI (GPT-5.x) | 3 | 72.4% | 68.6% | 3.8 pp |
| Google (Gemini) | 1 | 68.6% | 68.6% | 0.0 pp |
| Moonshot (Kimi K2) | 1 | 62.9% | 68.6% | +5.7 pp |
| Alibaba (Qwen3) | 1 | 60.0% | 57.1% | 2.9 pp |
| Meta (Llama) | 3 | 46.7% | 49.5% | +2.9 pp |
| Open-source (GPT-OSS) | 1 | 42.9% | 45.7% | +2.9 pp |
| Dataset | JSON Pretty | JSON Compact | CSV | Markdown | YAML | Zen Grid |
|---|---|---|---|---|---|---|
| 4,166 | 3,673 | 1,303 | 1,430 | 1,916 | 1,653 | |
| GitHub | 1,388 | 968 | 688 | 792 | 1,185 | 968 |
| Financial | 1,023 | 643 | 408 | 505 | 840 | 516 |
| Rank | Format | Total Tokens | vs JSON Compact | JSON-compat. |
|---|---|---|---|---|
| 1 | JTON | 144,159 | 20.2% | Yes |
| 2 | TOON | 146,113 | 19.2% | No |
| 3 | JSON compact | 180,725 | – | Yes |
| 4 | YAML | 220,129 | +21.8% | No |
| 5 | JSON pretty | 282,332 | +56.2% | Yes |
| 6 | XML | 332,171 | +83.8% | No |
| Model | Family | Few-shot | Zero-shot |
|---|---|---|---|
| GPT-5-mini | OpenAI | 100% | 100% |
| GPT-5.1 | OpenAI | 100% | 100% |
| GPT-4o | OpenAI | 100% | 100% |
| Claude Sonnet 4 | Anthropic | 100% | 100% |
| Claude 3.5 Haiku | Anthropic | 100% | 100% |
| Claude 3 Haiku | Anthropic | 100% | 100% |
| Rows | Size | Parse (MB/s) | Speedup | Serialize (MB/s) | ||
|---|---|---|---|---|---|---|
| (KB) | stdlib | JTON | stdlib | JTON | ||
| 100 | 5.5 | 34.5 | 49.9 | 1.44 | 51.8 | 98.4 |
| 500 | 27.8 | 27.7 | 13.4 | 0.48 | 29.5 | 32.1 |
| 1,000 | 55.6 | 18.4 | 21.4 | 1.16 | 18.1 | 25.5 |
| 5,000 | 282.6 | 35.0 | 45.4 | 1.30 | 41.0 | 83.6 |
| File | Size (KB) | stdlib (MB/s) | JTON (MB/s) | Speedup |
|---|---|---|---|---|
| canada.json | 2,198 | 16.0 | 29.7 | 1.85 |
| citm_catalog.json | 1,687 | 41.9 | 66.1 | 1.58 |
| twitter.json | 617 | 48.5 | 50.4 | 1.04 |
| github.json | 55 | 128.9 | 98.7 | 0.77 |
| Rows | stdlib JSON (MB/s) | JTON JSON (MB/s) | JTON Zen Grid (MB/s) |
|---|---|---|---|
| 100 | 51.8 | 98.4 | 88.3 |
| 500 | 29.5 | 32.1 | 75.4 |
| 1,000 | 18.1 | 25.5 | 30.3 |
| 5,000 | 41.0 | 83.6 | 149.9 |
| Format | Tokens/call | Monthly tokens | Monthly cost |
| JSON Compact | 8,702 | 8.70B | $21,755 |
| Zen Grid | 6,709 | 6.71B | $16,773 |
| Zen Grid + Bare | 5,509 | 5.51B | $13,773 |
| Savings (Zen Grid vs JSON) | $4,982/mo | ||
| Savings (Zen Bare vs JSON) | $7,982/mo | ||
Token Efficiency
Token efficiency studies how to reduce language-model token use, cost, and latency while preserving task quality and equitable access.
See all 30 papers