TOON Format for Rust
Token-Oriented Object Notation is a compact, human-readable format designed for passing structured data to Large Language Models with significantly reduced token usage.
Example
JSON (verbose):
TOON (compact):
users[2]{id,name,role}:
1,Alice,admin
2,Bob,user
Resources
Usage
use json;
use ;
let data = json!;
let toon = encode_default?;
let decoded = decode_default?;
assert_eq!;
Contributing
Interested in implementing TOON for Rust? Check out the specification and feel free to contribute!
License
MIT License © 2025-PRESENT Johann Schopplich