Encode
Converts a JSON object to its string representation.
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
- Payload - JSON object to be converted to string.
Options
This node does not have any options.
Outputs
- Value - String representation of the JSON object.
How It Works
The Encode node converts a JSON object to its string format. When executed, the node:
- Receives a JSON object through the Payload input
- Uses JSON marshaling to convert the object to a string
- Outputs the string representation through the Value output
Requirements
- Valid JSON object as input
Error Handling
The node will return specific errors in the following cases:
- Invalid JSON object in the Payload input
- JSON marshaling errors
Usage Notes
- This node is useful for converting JSON objects to strings for storage or transmission
- The output string is in standard JSON format
- Works with nested JSON objects and arrays
- Useful when you need to store JSON data as text or send it over networks
- Can be combined with Decode node to convert strings back to JSON objects
- The string output can be used with file writing or API request nodes
- Works with any valid JSON structure including objects, arrays, strings, numbers, and booleans
- The output string includes proper JSON formatting with quotes and braces