Decode JSON (New)

The Decode JSON action parses a JSON string and populates the identified variables.

The Decode JSON action is part of the Technology Preview Extension

This action is part of the Technology Preview Extension, which is also referred to as the sandbox package. For information on obtaining and installing the extension, see Technology Preview Extension.

Parameter descriptions

Parameter Description
JSON Template The JSON description of the variables to decode. Each variable is specified as shown in the example with:
  • Map variable name - The name of the map variable, which will be added as a row on the Output tab.
  • Sample Value - A value that this map variable will most likely contain. This value will be evaluated to determine the data type of the variable. The value can contain an array of values which is indicated by enclosing the value within the { } characters. This value can also be a structure, which is indicated by enclosing the value within the [ ] characters.
    The multi-line input icon can be used to display a larger input area for the JSON variable description.

Clicking the multi-line input icon allows you to view or edit the JSON Template.

Select the Use Advanced Properties to view the advanced properties. The following table describes the advanced properties parameters:

Parameter Description
Structure Delimiter Character(s) Each member within a JSON structure must be represented at runtime as a unique variable. A unique name is created to identify each member in the structure. The name consists of the structure name, followed by a delimiter character, followed by the member name. The default character used to delimit between the structure name and the variable within the structure is the # character. This parameter can be used to change this value to another character.
Array Current Size Append Character(s)

The character(s) that will be used to name the current size input variable for an array.
Maximum String Size The maximum length of the strings in an array that can be contained within a JSON variable. A default maximum string size of 256 is used for all variables on the Output tab that have a data type of String.
Maximum Array Size The maximum length of arrays.
Missing Properties False: When you select this option, the action should run and succeed as expected. The output variables for those missing properties will not have any values.
True: When you select this option, the trigger should fail on the Decode JSON action with error -7603 (JSON - Item not found.)

Each member within a JSON structure must be represented at runtime as a unique variable. A unique name is created to identify each member in the structure. The name consists of the structure name, followed by a delimiter character, followed by the member name.

Input tab

Parameter Description
JSON Input The source of the JSON string when the trigger action is executed. This can be a variable or be a constant string.

Output tab

Parameter Description
Output variables Each output variable identified from the JSON Template will be added as a row, allowing the parsed member to be assigned to a variable.
resultStatus An INT4 variable that will contain the completion status of this action. A value of zero indicates the JSON Input value was successfully parsed and matched the template identified in the JSON Template parameter. A non-zero value indicates the action was not successful.
resultMessage A String variable of 64 characters that will provide further information when the resultStatus is non-zero.