Actions2
TOON to JSON
AI-generatedSummary
Parse TOON format text into a JSON object with optional expansion of dotted keys into nested objects and validation of indentation and structure.
Inputs
- Input Data (required) — The TOON format string or a string reference to the TOON data to be converted to JSON. The input can be entered directly or referenced from workflow input data using dot notation or a field name.
- Output Field (required) — The name of the field where the parsed JSON output will be stored in the node's output.
- Additional Options: Expand Paths — Controls whether dotted keys in the TOON input are expanded into nested JSON objects ('safe') or left as-is ('off'). Default is 'off'.
- Additional Options: Expected Indent Size — The number of spaces expected for each indentation level in the TOON input for validation purposes. Default is 2.
- Additional Options: Strict Mode — Whether to enforce strict validation on array counts, indentation multiples, and other rules during parsing. Default is true.
Output shape
a JSON object representing the decoded TOON data
The output JSON is added as a new field named by 'Output Field' to each input item. If strict mode is enabled, parsing errors will throw exceptions unless 'Continue On Fail' is active. When 'Expand Paths' is set to 'safe', keys with dot notation will be expanded into nested objects in the resulting JSON.
Examples
Example 1: Parsing a TOON string to JSON
Input the TOON text in the 'Input Data' field or reference it from the input JSON, specify 'Output Field' as the field to save parsed JSON, and configure optional parsing behaviors like indentation and expand paths.