JSON Parser
AI-generatedSummary
Parse JSON from item input with optional LLM repair
Inputs
- inputMode (required) — Where to read the raw input from. Options: Auto Detect (auto) or Field (field). Default: auto.
- fieldName — Field path to parse (dot notation). Shown only when inputMode is field. Default: text.
- arrayHandling (required) — How to handle top-level JSON arrays. Options: Split Into Items (split) or Keep As Array (keep). Default: split.
- outputMode (required) — Choose whether to return parsed JSON, a JSON string, or both. Options: Parsed JSON (parsed), JSON String (string), Parsed + JSON String (both). Default: parsed.
- repairWithLlm (required) — Whether to try repairing the JSON if parsing fails and a Language Model input is connected. Default: true.
- llmSystemPrompt — Instructions used to normalize the input before parsing. Shown only when repairWithLlm is true. Default: strict JSON normalizer prompt requiring single valid JSON value, array for multiple objects, or error object on failure.
Output shape
Main output connection. Each item contains a json field with the parsed value formatted per outputMode and arrayHandling, plus a pairedItem index.
When outputMode is 'parsed', the json field holds the parsed JSON value. When 'string', it holds {jsonString: ...}. When 'both', it holds {value: ..., jsonString: ...}. Top-level arrays are split into separate items when arrayHandling is 'split', or kept as one array when 'keep'.
Examples
Example 1: Auto-detect string input '42'
inputMode=auto, outputMode=parsed, arrayHandling=keep, repairWithLlm=false. Raw input '42' is parsed as number and returned as json: 42.
Example 2: Field-based parsing with LLM repair
inputMode=field, fieldName=data, repairWithLlm=true, outputMode=both. If the 'data' field contains unparseable text, the connected LLM is prompted with the default system prompt to normalize and re-parse.