The JSON Builder activity node
Infor Process Automation is compatible with the lightweight data-interchange format, JSON (Java Script Object Notation).
The JSON Builder node supplies a wizard to step you through building either a new JSON text or modifying an existing one.
JSON Builder fields
Field name | Description |
---|---|
JSON Object | The wrapper name for the JSON text as a whole. When a new JSON text is being built, this field is automatically populated as "NewJSONObject". This field is not mandatory. If the initial value is not altered, then no wrapper name will be given to the JSON text when it is built. |
JSON Key |
This field holds the key for the JSON text key value pair. When a new JSON text is being built, this field is automatically populated as "(New Element 0)". If this initial value is not altered, it will not be used as the key in the text that is built. A key can be any string except valid JavaScript key words. Note:
If you edit this field with your own value, then the next row will be auto-populated with the initial value "(New Element 0)". |
Data Type |
The Builder supports many data types. Select the data type you want to use from the dropdown box. Options are:
|
Available buttons
The following table describes the use of buttons that are activated for the JSON Builder node.
Button | What it does |
---|---|
Delete | Deletes one or more key and value pairs. Any key can be selected to delete and Ctrl or Shift can be used to select multiple keys. Keys from different JSONObject or JSONArray also can be selected if the JSON text is nested. |
Delete All | Deletes all key and value pairs in the JSON text. If you select this button, the entire JSON text in the Builder is deleted. |
Expand | Expands one or more JSONObjects or JSONArrays including any child objects or arrays if they exist. |
Expand All | Expands all JSONObjects and JSONArrays in the entire JSON text. |
Collapse | Collapses one or more JSONObjects or JSONArrays including any child objects or arrays if they exist. |
Collapse All | Collapses all the JSONObjects and JSONArrays in the Builder. |
Move Up | Moves up the key and value pair in the order. |
Move Down | Moves down the key and value pair in the order. |
Insert Below | Insert a new row with an initial value lower than the selected key. |
Insert Above | Insert a new row with an initial value higher than the selected key. |
Copy |
Copies the data type and value of the selected key. This features copies all JSONObject or JSONArray values including any objects or arrays if they exist. This feature might be helpful, for example, in a situation where the same JSONObjects are built with the same keys but different values. |
Paste | Pastes the data type and value (copied with the Copy button) into the selected key. If the key has an existing data type and value, it will be replaced with the new data type and value. |
Undo | Undoes the previous work only. |
Output variables
At runtime this activity node creates:
-
<nodename>_jsonVar: A JSON Object variable
-
<nodename>_jsonText: A text variable
These variables can be used anywhere in the process.