This repository contains source code and resources of the YouTube video: Let's Talk About TOON(Token-Oriented Object Notation)
TOON: Token-Oriented Object Notation
TOON is a compact, human-readable, schema-aware JSON for LLM prompts. Spec, benchmarks, TypeScript SDK.
It saves the token usage for LLMs by reducing the verbosity of traditional JSON while maintaining structure and readability.
Traditional JSON:
{
"fruits": [
{ "id": 1, "name": "Apple", "color": "red" },
{ "id": 2, "name": "Banana", "color": "yellow" },
{ "id": 3, "name": "Grapes", "color": "purple" }
]
}TOON Representation:
fruits[3]{id,name,color}:
1,Apple,red
2,Banana,yellow
3,Grapes,purple
- Clone the repository
- Install dependencies
- Add your OpenAI API key in the .env file
- Run
npm run testto see TOON in action
To know more about TOON, please visit the official GitHub repository: https://github.com/toon-format/toon