In today's rapidly evolving AI technology, we are constantly exploring ways to make AI process various types of data more efficiently. Currently, JSON is the most mainstream data format, but its redundancy leads to high token consumption when interacting with AI. To address this issue, a new data format called TOON has been designed to replace JSON in interactions with LLMs, reducing token consumption.
TOON GitHub: https://github.com/toon-format/toon
Demo Website: https://toonformat.dev/

Format Example
Conventional JSON format:
{
"users": [
{ "id": 1, "name": "Alice", "role": "admin" },
{ "id": 2, "name": "Bob", "role": "user" }
]
}Converted to TOON format:
users[2]{id,name,role}:
1,Alice,admin
2,Bob,userAh, is history repeating itself? What's the difference between this and CSV? If any, it's that TOON better supports nesting.
If TOON is Used in the GIS Industry?
Let's try a GeoJSON data example:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "Sample Point"
},
"geometry": {
"type": "Point",
"coordinates": [
116.3974,
39.9093
]
}
}
]
}Converted to TOON format:
type: FeatureCollection
features[1]:
- type: Feature
properties:
name: Sample Point
geometry:
type: Point
coordinates[2]: 116.3974,39.9093This comparison shows significant savings. Further compression can achieve even smaller sizes. Therefore, I believe this structure is particularly suitable for lightweight GIS applications, such as:
- Mobile map applications
- Mini-programs
- WebGL map tools
- Backend APIs transmitting large amounts of feature data
- IoT + GIS terminals uploading lightweight location data
Currently, no GIS development frameworks natively support the TOON format, but it can be implemented using tools that convert between JSON and TOON.
PS: I haven't tried it myself yet, so everyone is welcome to practice on their own.
JSON to TOON Conversion Tool
To facilitate experimentation, I have added a conversion to TOON feature to a previously developed JSON formatting tool. Those interested can try it out at:
https://tools.malagis.com/zh/json-converter
Differences from TopoJSON
Does this remind anyone of another format in the GIS industry, TopoJSON? So what are the differences between TOON and TopoJSON? TopoJSON is a topologically compressed version of GeoJSON, while TOON is a lightweight, extensible object serialization format. Both can reduce GIS data volume, but they address entirely different problems.
TopoJSON relies on topological compression of shared edges, by extracting and reusing common arcs between polygons to achieve data compression. For instance, multiple administrative regions sharing the same edge store it only once, achieving compression rates of over 80% for complex polygon data like administrative boundaries.
TOON's compression comes from its binary structure (smaller than textual GeoJSON), removal of redundant fields (e.g., "type": "Feature"), and a more compact custom object structure. Data reduction typically ranges from 30% to 60%, but depends on the specific schema. TOON does not understand topology nor perform geometric optimizations.
I believe TOON and TopoJSON are not competitors but complementary. TopoJSON is a map geometry optimization format, especially suited for strong compression of administrative and polygon data. TOON is a lightweight object data protocol, suitable for business objects, IoT, frontend-backend APIs, and small-scale GIS data transmission.
Conclusion
Indeed, sometimes constraints become the primary driver of productivity. The traditional JSON format has long been criticized for its shortcomings, but due to its lightweight and human-readable nature, it has dominated the web data transmission field. In the AI era, with tokens becoming a cost-intensive factor, it's no surprise that new formats are emerging. I believe TOON is not the endpoint—it's just the beginning.