Parse JSON
This activity parses JSON content into a structure or schema of properties that can then be referenced by using the variable browser.
Usage
Enter the following properties to use this activity:
- General
- Display Name - Name displayed in the Workflow Editor for this activity.
- Description - Add a clear and useful description to provide meaningful information.
- Activity timeout (seconds) - Enter the amount of time in seconds that Automation will attempt to complete this activity before it times out.
- Continue workflow execution on failure - Check this check box to continue the workflow if this activity fails (optional).
- Skip activity execution - Check this check box to bypass running this activity during the workflow execution (optional).
- Parse JSON
- Source JSON - Paste the raw JSON content into the text box, or click the
(Variable Reference) icon and choose the run time variable with the JSON text to parse (for example, the output body in a response from a preceding HTTP request: Activities > HTTP Request > Output > Body). The JSON must be valid at run time, and the maximum size allowed is 1 MB. - Example JSON - Paste a representative JSON example to generate the data structure and load properties in the workflow into the variable reference browser. The maximum nesting depth allowed is 5, and the maximum number of objects per level is 100. Variables, objects, and arrays are allowed, and dates are auto-detected.
- Source JSON - Paste the raw JSON content into the text box, or click the
Once the activity has parsed the data, JSON properties loaded is shown, indicating that the properties have been successfully loaded and are now available for you to use in downstream activities by choosing the property in the variable reference browser (Activities > Parse JSON > Parsed JSON > ...).
For example, if you want to return the value from the workflow, use the Set Variables activity downstream to set an output variable of the workflow to a value parsed from the JSON:
-
Under Variables, click Add.
-
In Variable to update, click the
(Variable Reference) icon and drill down to choose the desired workflow output variable. -
In New value, click the
(Variable Reference) icon and drill down to choose the property from Parsed JSON under Activities. -
The variables do not support nested arrays or nested objects, so only the one top level array or object can be set as the value using the Parsed JSON variable reference.