# TRON Specification TRON (Token Reduced Object Notation) is a data serialization format that extends JSON. It is designed to be more compact by allowing the definition of "classes" (schemas) for objects, reducing the repetition of property names. TRON is a superset of JSON, meaning any valid JSON is also valid TRON. ## 1. Quick Example Let's start with a simple example before we get into the details of the format. The following shows the same data represented in JSON and TRON.
| JSON | TRON |
|---|---|
| ```json { "index": "ord-123", "items": [ { "index": 1, "name": "Widget", "price": 19.99, "quantity": 2 }, { "index": 2, "name": "Gadget", "price": 29.99, "quantity": 1 }, { "index": 3, "name": "Gizmo", "price": 39.99, "quantity": 1 } ], "total": 109.96 } ``` 131 tokens for OpenAI models (73 tokens if fully compressed) | ```python class Order: index,items,total class Product: index,name,price,quantity Order( "ord-123", [ Product(1,"Widget",19.99,2), Product(2,"Gadget",29.99,1), Product(3,"Gizmo",39.99,1) ], 109.96 ) ``` 80 tokens for OpenAI models (64 tokens if fully compressed) |