Token-Oriented Object Notation

Last updated
Token-Oriented Object Notation
Filename extension
.toon
Internet media type
text/toon
Type code TEXT
Latest release
3.0
2025-11-24
Type of formatData serialization
Extended from JSON
Website toonformat.dev

Token-Oriented Object Notation (TOON) is a text-based data format. It encodes the JSON data model in a compact way. TOON is designed to reduce token usage in LLM prompts while staying human-readable. [1]

Contents

History

TOON was introduced in 2024 by the TOON Project. The goal was to make structured data smaller for AI systems. Version 1.0 focused on basic JSON conversion. Version 2.0 added array headers. Version 3.0, released in 2025, improved syntax and added official media type. [2]

Features

TOON was created for three main reasons:

Syntax

TOON uses indentation instead of braces for objects. It declares array length and field names once in a header. Arrays of objects are written in a tabular form. Strings are quoted only when needed. [1] [2]

users[2]{id,name,role}:1,Alice,admin2,Bob,user

This means an array named "users" with two objects having fields "id," "name," and "role." [1] [3]

Comparison to JSON

TOON and JSON both represent objects and arrays. TOON removes braces and commas. It uses headers for arrays instead of repeating keys. This makes TOON shorter but less strict than JSON. [2]

The same TOON-defined data above as JSON:

{"users":[{ id:1, name:"Alice", role:"admin"},{ id:2, name:"Bob", role:"user"},]}

Other information

The provisional media type is text/toon. Files use the .toon extension. [1]

Official implementations exist in TypeScript. Community versions are in Python, Go, Rust, and .NET. [2]

References

  1. 1 2 3 4 5 6 "TOON Format Specification". GitHub. 2025-11-24.
  2. 1 2 3 4 5 "TOON Documentation". TOON Project.
  3. "🚀 TOON (Token-Oriented Object Notation) — The Smarter, Lighter JSON for LLMs". DEV Community. November 2, 2025. Retrieved 2025-12-16.