This page gives application developers enough TOON syntax to read examples and understand what DevOp.Toon emits.
For the canonical format definition, use the official TOON site. This page is intentionally implementation-oriented.
Simple values:
name: Ada
active: true
count: 3
Nested object:
user:
id: 1
name: Ada
Primitive array:
tags[3]: red,green,blue
Tabular array of objects:
items[2]{id,name}:
1,Ada
2,Bob
key: value[3]:Strings should be quoted when they would otherwise be ambiguous, for example when they:
null, or numbersExample:
version: "123"
enabled: "true"
note: "hello, world"
name: ""
The encoder supports different delimiters for inline arrays and tabular rows through ToonEncodeOptions.Delimiter.
Common examples:
DevOp.Toon supports object-array layouts through ToonObjectArrayLayout. The most important implementation-specific mode is Columnar.
Columnar keeps shared primitive fields in a row header, then spills complex nested values below each row. That allows the library to preserve compactness even when rows contain nested arrays or objects.
This is one reason the package performs well on real-world catalog and warehouse data instead of only on perfectly flat records.