
Why I Built TOON: A Better Data Format for APIs
Introducing TOON — Typed Object Oriented Notation JSON is everywhere. It powers APIs, microservices, automation tools, and frontend apps. But as applications scale, JSON becomes: verbose repetitive bandwidth heavy lacking type structure That’s why I built TOON (Typed Object Oriented Notation) — a compact, typed, and developer-friendly alternative. 👉 npm: https://www.npmjs.com/package/toonkit 🧠 What is TOON? TOON = Typed Object Oriented Notation It combines: ✔ schema ✔ data ✔ types ✔ compact structure Think of it as JSON + schema + compression + readability. ❌ The Problem with JSON A typical API response: { "employees": [ { "id": 1, "name": "Riya", "salary": 90000, "active": true }, { "id": 2, "name": "John", "salary": 80000, "active": false } ] } Problems: repeated keys increase payload size no built-in typing inefficient for large responses ✅ The TOON Solution employees[2]{id:n,name:s,salary:n,active:b}: 1,Riya,90000,true 2,John,80000,false ✔ smaller payload ✔ typed schema ✔ readable
Continue reading on Dev.to Webdev
Opens in a new tab



