toonkit2
Type-SafeCompactHuman-ReadableMIT

toonkit2

A parser & serializer for TOON — Typed Object Oriented Notation. Transform JSON to compact TOON format and back with built-in type awareness.

$ npm install toonkit2
Docs → TOON Data Types
🧬

TOON Data Types

Complete guide to every supported TOON type code

TOON uses single or two-letter codes to declare the type of each field. This allows toonToJson to parse values correctly and jsonToToon to detect types automatically.

sStringManojPlain text, no special escaping needed
nNumber87 or 36.7Integers and floats
bBooleantrue or falseLowercase only, case-sensitive
nlNullnullRepresents null/undefined values
jJSON Object{"a":1}Valid JSON object, auto-parsed
aArray[1,"a",true]Valid JSON array, auto-parsed
tdText/Date03042026120000Raw text, no parsing (good for date strings)