TOON Format API

API endpoints for encoding and decoding TOON format.

Endpoints

POST /api/encode

Convert JSON to TOON format

{
  "data": { "users": [{"id": 1, "name": "Alice"}] },
  "options": {
    "delimiter": ",",
    "indent": 2,
    "keyFolding": "off"
  }
}

POST /api/decode

Convert TOON to JSON

{
  "toon": "users[1]{id,name}:\n  1,Alice",
  "options": {
    "strict": true,
    "expandPaths": "off"
  }
}