TOON – Token Oriented Object Notation: A Lightweight Format for Structured Data
Modern software systems rely heavily on structured data formats—JSON, XML, YAML, and others have shaped the way data is stored and transmitted. But in highly specialized environments such as animation pipelines, configuration-heavy applications, simulation engines, or embedded systems, we often need a format that is:
This is where TOON (Token Oriented Object Notation) emerges as a practical, flexible option.
TOON is a structured, text-based notation that organizes data using tokens, types, attributes, and nested blocks. Whether you're representing configuration files, object metadata, or hierarchical structures such as rigs and scene objects, TOON provides a clear and minimalistic approach.
What Is TOON?
TOON (Token Oriented Object Notation) is a data representation format built around the concept of tokens, where each token can represent:
It uses a simple and intuitive syntax that resembles a blend of JSON, INI files, and object declaration languages. TOON emphasizes readability and low parsing overhead, making it ideal for custom pipelines, scripting workflows, and systems that need human-friendly configuration.
Why TOON? Key Advantages
1. Token-Based Architecture
Every meaningful element—type, key, value, block—is treated as a token. This makes lexing and parsing extremely simple.
2. Human-Readable Syntax
Unlike JSON, you don’t deal with commas or strict quoting. Unlike XML, you don’t deal with verbose tags. TOON is clean and minimal.
3. Hierarchical Object Support
TOON supports nested objects, making it ideal for defining rigs, scenes, configurations, or multi-level data.
4. Extensible by Design
You can define your own object types, attributes, and nested rules without breaking the format.
5. Lightweight Parsing
A TOON parser can be implemented in under 300 lines in most languages, making it appealing for custom tools.
TOON Syntax Overview
TOON defines data using a simple pattern:
type <TypeName> "<ObjectName>"
{
key value
key value value2
type <ChildType> "<ChildName>"
{
key value
}
}
Let’s break this down:
This makes the format suitable for both machines and humans.
Recommended by LinkedIn
Example: TOON Format for Application Configuration
Below is a practical example representing an application configuration using TOON:
type config "ApplicationSettings"
{
version 2.0
description "Production configuration for service"
type database "PrimaryDB"
{
host "db.example.com"
port 5432
user "app_user"
maxConnections 20
}
type service "API"
{
endpoint "/v1/data"
timeout 30
secure true
}
type logging "Logger"
{
level "INFO"
output "file"
filePath "/var/log/app.log"
}
}
What this example showcases:
This configuration could be used in a game engine, microservice, simulation system, or even in a custom build pipeline.
When Should You Use TOON?
TOON is particularly useful when:
✔ You need a lightweight alternative to JSON or XML ✔ Your system requires clear hierarchy ✔ You want an easily editable configuration format ✔ You want to build a custom DSL for animation, simulation, or tooling ✔ You are working in game engines, VFX pipelines, or embedded systems
When TOON May Not Be Ideal
Although powerful, TOON may not be the best choice for:
✘ High-volume data serialization ✘ Strict schema-based validation ✘ Interoperability across third-party systems
For those cases, JSON or Protobuf may be a better fit.
Conclusion
TOON—Token Oriented Object Notation—is a flexible, lightweight, and human-friendly data format that shines in scenarios where readability and hierarchical structure matter. Its token-based design and clean syntax make it ideal for specialized domains such as animation rigs, configuration systems, simulation environments, and custom tooling.
If your workflow demands clarity, structure, and ease of parsing without the overhead of verbose formats, TOON is a compelling choice.
If you'd like, I can also help you with:
🔧 A custom TOON-to-JSON converter 📦 A full Python/Node.js parser for TOON format 📝 More TOON examples (mesh data, animation data, settings, etc.)
Nadir Riyani holds a Master in Computer Application and brings 16+ years of experience in the IT industry to his role as an Engineering Manager. With deep expertise in Microsoft technologies, Splunk, DevOps Automation, Database systems, and Cloud technologies, Nadir is a seasoned professional known for his technical acumen and leadership skills.
A passionate AI enthusiast, Nadir actively represents and evangelizes AI initiatives within his organization. He consistently takes the lead in exploring, adopting, and promoting AI-driven solutions that enhance productivity, innovation, and business outcomes. His forward-thinking approach positions him as a key contributor to the company’s AI transformation journey.
He has published over 250+ articles in public forums, sharing his knowledge and insights with the broader tech community. Nadir's extensive experience, passion for innovation, and impactful contributions make him a respected figure in the IT world.