Skip to content

Converts Token-Oriented Object Notation (TOON) to JSON. TOON is a compact, human-readable serialization of JSON designed for LLM prompts. From TOON lives in the Data format category of the fx menu. See the TOON specification for format details.

ParameterTypeRequiredDefaultDescription
Inputstringyes—TOON text to decode into JSON. Must be a string (previous-step TOON output or a literal). Empty Input is rejected.
Indent sizenumberno2Spaces per indentation level expected in the TOON input. Must match the indent used when the document was encoded (default 2, same as @toon-format/toon decode).
StrictbooleannotrueWhen true (default), enforce declared array lengths and tabular row counts and reject mismatches. Set false only to accept non-conforming TOON the library can still parse loosely.

Studio shows these descriptions on each parameter. Options map to the library’s non-deprecated indentSize and strict decode settings (deprecated indent is not exposed).

TypeDescription
JSONJSON string produced by decoding the TOON input.
  • Empty Input raises an evaluation error.
  • Invalid TOON (or length mismatches when Strict is enabled) raises an evaluation error — fix the Input or disable Strict only when you intentionally accept non-conforming documents.
  • Decoding follows the official @toon-format/toon decoder.
Decode TOON to JSON

Convert TOON text (for example the output of To TOON) back into a JSON string for downstream steps.

  1. Set Input to:

    Input
    ok: true
  2. Leave Strict enabled.

  3. Confirm Output value is:

    Output
    {"ok":true}