| Crates.io | rustapi-toon |
| lib.rs | rustapi-toon |
| version | 0.1.207 |
| created_at | 2026-01-01 11:24:07.315113+00 |
| updated_at | 2026-01-26 00:03:22.896575+00 |
| description | TOON (Token-Oriented Object Notation) support for RustAPI - LLM-optimized data format |
| homepage | |
| repository | https://github.com/Tuntii/RustAPI |
| max_upload_size | |
| id | 2016074 |
| size | 107,002 |
Token-Oriented Object Notation (TOON) support.
TOON is an experimental, density-optimized data format designed for High-Volume LLM Interactions.
When building agents or APIs that consume massive amounts of structured data via LLMs (GPT-4, Claude), standard JSON is token-expensive due to repeated keys and syntax overhead. TOON eliminates this redundancy.
JSON (Expensive)
[
{"id": 1, "role": "admin", "active": true},
{"id": 2, "role": "user", "active": true},
{"id": 3, "role": "user", "active": false}
]
TOON (Optimized)
users[3]{id,role,active}:
1,admin,true
2,user,true
3,user,false
RustAPI handles this transparently via content negotiation.
use rustapi_toon::Toon;
// Accepts explicit TOON or JSON automatically based on Content-Type
#[post("/ingest")]
async fn ingest(Toon(data): Toon<Vec<User>>) -> impl Responder {
// ...
}