Decode
Converts a JSON string to a JSON object.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
Inputs
- Value - JSON string to be converted to an object.
Options
This node does not have any options.
Outputs
- Payload - JSON object parsed from the input string.
How It Works
The Decode node converts a JSON string to a JSON object. When executed, the node:
- Receives a JSON string through the Value input
- Uses JSON unmarshaling to parse the string into an object
- Outputs the parsed object through the Payload output
Requirements
- Valid JSON string as input
Error Handling
The node will return specific errors in the following cases:
- Invalid JSON string in the Value input
- JSON unmarshaling errors
Usage Notes
- This node is useful for converting JSON strings from external sources into objects for processing
- The input string must be in valid JSON format
- Works with nested JSON objects and arrays
- Useful when reading JSON data from files or API responses
- Can be combined with Encode node to convert objects back to strings
- The parsed object can be used with other JSON processing nodes like Get, Set, and Delete
- Works with any valid JSON structure including objects, arrays, strings, numbers, and booleans
- Handles standard JSON formatting with proper quotes and braces