Why JSON Breaks in AI Pipelines — and the TOON Format I Built to Fix It
JSON has been the default data format for decades. It’s simple, readable, and works almost everywhere.
But recently, while building AI-driven workflows, I kept running into the same problem:
👉 JSON isn’t designed for meaning. It’s designed for structure.
The Problem I Hit
When working with LLMs and agent-based systems, I noticed:
- JSON is too verbose for iterative reasoning
- Nested structures become hard to interpret semantically
- Relationships between data are implicit, not explicit
- Small changes break parsing or require rigid schemas
Example
{
"task": {
"name": "generateReport",
"input": {
"user": "Alex",
"role": "developer"
}
}
}
This works for machines — but for AI systems trying to reason, it’s noisy.
What I Needed Instead
I wasn’t looking for a “better JSON”.
I needed something that:
- Is human-readable at a glance
- Represents relationships clearly
- Works well with AI parsing + generation
- Reduces unnecessary syntax
Introducing TOON (Experimental)
So I started experimenting with a lightweight format I’m calling TOON.
Same data in TOON:
task:
name -> generateReport
input:
user -> Alex
role -> developer
What’s Different?
1. Less syntax, more signal
No quotes, fewer brackets — easier to scan.
2. Explicit relationships
Using -> makes intent clearer than key-value ambiguity.
3. AI-friendly structure
LLMs tend to:
- generate this format more consistently
- interpret it with fewer errors
Where This Actually Helped
In my tests (early stage):
- Prompt-to-structure conversion became more stable
- Parsing required less strict validation
- Debugging outputs was faster
But It’s Not Perfect
This is not a “JSON killer”.
TOON currently lacks:
- Standardization
- Tooling ecosystem
- Performance benchmarks at scale
And JSON is still the best choice for:
- APIs
- Production systems
- Interoperability
So Why Explore This?
Because AI systems are changing how we think about data.
We’re moving from:
“How do we structure data for machines?”
to:
“How do we structure data for reasoning systems?”
Full Article Medium Link: https://medium.com/stackademic/farewell-json-hello-toon-the-future-just-arrived-561b74a0059e
Top comments (1)
“How do we structure data for machines?”