
🎯 Are You Wasting Tokens in Your LLM Pipelines?#
If you’re sending JSON to your models, probably yes. There’s a more efficient alternative: TOON. 🚀
🔍 The Problem with JSON in LLMs#
JSON is great for APIs and storage, but in LLM prompts it generates unnecessary overhead. When you send 100 records, the same field names repeat in every object.
Traditional JSON:
{"users": [
{"id": 1, "name": "Alice", "role": "admin"},
{"id": 2, "name": "Bob", "role": "user"}
]}✅ The Solution: TOON#
TOON (Token-Oriented Object Notation) — same data, fewer tokens:
users[2]{id,name,role}:
1,Alice,admin
2,Bob,userFields are declared once, and values are streamed in compact tabular form.
📊 How Much Does It Save?#
- Removes
{}braces, quotes, and repeated field names - Especially efficient for uniform arrays of objects
- Compact, lossless representation
💡 Explanation in a nutshell#
TOON (Token-Oriented Object Notation) is a data format designed for LLM pipelines that represents the same information as JSON but with far fewer tokens. It declares fields once at the start and then streams values in tabular form, eliminating the repeated field name bloat that inflates JSON prompts — particularly useful when sending large arrays of objects to a model.
More information at the link 👇

