JSON package guide
Parse, read, change, convert and validate JSON documents.
Version 2.17.1. Installed versions can differ. Examples are illustrative and not tested.
Prerequisites
- No other application is needed. The Run account must be able to read the files. Relative paths start in the Run's working folder.
- A file can be up to 64 MiB, and JSON text up to 16,777,216 characters.
- Start session opens a JSON document and gives it a name. Use the same name in every later step, then run End session. Start session defaults to
Default, but the other actions have no default, so always set a nonblank name. Opening the same name again replaces the document. Sessions end with the Run. - Changes stay in the session only. To save them, read
$with Get node value, or convert to a Dictionary and use Convert dictionary to JSON, then write the text to a file with a text file action. - A String that holds JSON text cannot be used where a List, Dictionary or Table is asked for. A Datetime value, such as
2026-10-15T09:30:00+00:00, becomes date text in JSON.
Paths. Paths are case-sensitive. users[0].name and $.users[1].name select the names of the first and second user. List items are counted from 0, and $ is the whole document. Keys in brackets, such as ["item-name"], work. Wildcards, filters and recursive search do not. A null node counts as missing for actions that need a node.
Sample data. For each example, open a new session named sample with Source input=text and this Payload:
{"name":"ada","age":36,"tags":["x","y"],"users":[{"name":"a"},{"name":"b"}]}Make the Dictionary $person$ with String name=ada and Number age=36, and the List $tags$ with the Strings q and r. For Get nodes, make the Table $entries$ with table actions, with three String columns and two rows:
| nodePath | dataType | outputKeyName |
|---|---|---|
age | Number | years |
users[0].name | String | empty |
Shared fields
| Input | Use |
|---|---|
session | The name of an open document in this Run, such as sample. It is not a credential. Set it in each session step. |
node | A path such as users[0].name, $.users[1].name or ["item-name"]. See Prerequisites. |
file | A JSON file, such as samples/. |
Value fields
Insert node and Update node value use these optional fields. Only the field that matches Value type is used.
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
value | Value type | Jsondefault Stringoptional | String, Boolean, Number, Datetime, List or Dictionary. |
string | Value | Stringdefault ""optional | Text, such as grace. It is written as a JSON string. |
bool | Value | Booleandefault falseoptional | true, false or a Boolean variable. It is written as JSON true or false, without quotes. |
num | Value | Numberdefault 0optional | A number such as 7 or 12.5, or a Number variable. It is written as a JSON number. |
date | Value | Datetimedefault 0001-01-01T00:00:00+00:00optional | A Datetime variable, such as 2026-10-15. It is written as date text, because JSON has no date type. |
list | Value | Listdefault []optional | A List variable, such as $tags$. Each item keeps its type. |
dictionary | Value | Dictionarydefault {}optional | A Dictionary variable, such as $details$ with Boolean active=true and Number count=2. It is written as an object, and each value keeps its type. |
Actions
Insert node (jsonAddNodeValue)
Add a key to an object in an open session, or replace it. Only the session changes.
Inputs
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
session | Session name | Stringdefault ""required | Shared |
node | Node path | Stringdefault ""required | Shared. The node must be an object. Missing parents are not created. |
key | Key name | Stringdefault ""required | The key to write, such as age. A key that exists is replaced. It does not add a list item. |
Also uses the value fields.
Outputs
None.
Example
Set Session name=sample, Node path=users[0], Key name=age, Value type=Number and numVal=7. Read users[0].age with Get node value.
Expected result
The first user now has Number age 7, and Get node value gives 7. $ selects the root object. A list or a single value as the parent fails.
Convert JSON to Table (jsonConvertToTable)
Convert the whole session document into Table rows.
Inputs
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
session | Session name | Stringdefault ""required | Shared |
Outputs
| Output | Type | Meaning |
|---|---|---|
result | Table | String columns in the order each key first shows, and one row for each item of the root list, or one row for a root object. Save it in $rows$. |
Example
Start the session tabular with Source input=text and Payload=[{"a":1,"b":2},{"a":3}]. Set Session name=tabular and save result in the Table $rows$.
Expected result
The columns are a and b. The rows are 1, 2 and 3, empty. A single root object gives one row. Single values in a root list go in the first column. An empty list gives no rows and one String column Column1. A single value as the root fails.
Convert dictionary to JSON (jsonDictionaryToJSON)
Turn a Dictionary into JSON text. It needs no session.
Inputs
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
dictionary | Dictionary variable | Dictionarydefault {}required | A Dictionary variable such as $person$. The type of each value sets its JSON type. A String with JSON text does not work here. |
Outputs
| Output | Type | Meaning |
|---|---|---|
result | String | The JSON text on one line. Save it in $json to write a file or a request body. |
Example
Set Dictionary variable=$person$. Save result in the String $jsonText$.
Expected result
The result is {"name":"ada","age":36}. The key order follows the Dictionary. An empty Dictionary gives {}. No file or session changes.
End session (jsonEndSession)
Close a session. Changes are not saved.
Inputs
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
session | Session name | Stringdefault ""required | Shared |
Outputs
None.
Example
After Start session opens sample, set Session name=sample.
Expected result
The session and its document are gone. A later Get node value for sample fails until the session is opened again. An unknown or blank name fails.
Get node array (jsonGetNodeList)
Read a JSON list as a List of text, for a loop.
Inputs
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
session | Session name | Stringdefault ""required | Shared |
node | Node key or path | Stringdefault ""required | Shared |
Outputs
| Output | Type | Meaning |
|---|---|---|
result | List | One String for each list item. Objects and lists become JSON text. Save it in $tag. |
Example
Set Session name=sample and Node key or path=tags. Save result in the List $tagTexts$.
Expected result
The List holds x and y. Numbers and Booleans also come back as text, and null items as empty text. An empty list gives an empty List. A missing node, a null node or a node that is not a list fails.
Get node value (jsonGetNodeValue)
Read one node as text. An object or a list comes back as JSON text.
Inputs
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
session | Session name | Stringdefault ""required | Shared |
node | Node key or path | Stringdefault ""required | Shared |
Outputs
| Output | Type | Meaning |
|---|---|---|
result | String | A string without its JSON quotes, or JSON text for other nodes. Numbers also come back as String. Save it in $name. |
Example
Set Session name=sample and Node key or path=$.users[1].name. Save result in the String $nameText$. For the whole document, use Node key or path=$.
Expected result
$nameText$ is b. Number age gives 36. A missing or null node fails, and does not give empty text.
Get nodes (jsonGetNodes)
Read several nodes into one Dictionary, each as the type you choose.
Inputs
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
session | Session name | Stringdefault ""required | Shared |
entry | Nodes entries | Tabledefault empty Tablerequired | A Table variable such as $entries$. The String column node names each node and is required. The optional String column data is String (the default), Number, Boolean or Datetime, in any case. The optional String column output gives the result key; blank uses the path. See Prerequisites. |
Outputs
| Output | Type | Meaning |
|---|---|---|
result | Dictionary | One key for each row, with a value of the row's data. Save it in $picked$. |
Example
Set Session name=sample and Nodes entries=$entries$. Save result in the Dictionary $picked$.
Expected result
$picked$ holds Number years=36 and String users[0].name=a. An empty Table gives an empty Dictionary. If two rows give the same key, the later row wins. A missing node, an unknown dataType or a value that cannot be converted fails the whole step.
Start session (jsonStartSession)
Open JSON text or a file as a named session for the next steps. Opening the same name again replaces the document.
Inputs
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
session | Session name | Stringdefault Defaultoptional | A nonblank name such as sample. If omitted, Default is used. Other session actions need the same name. |
input | Source input | Jsondefault fileoptional | file reads File path. text reads Payload. Only the selected source is used. |
file | File path | Stringdefault ""optional | Shared |
data | Payload | Stringdefault ""optional | For text: JSON text, or a String variable that holds it, such as {"name":"ada",. |
Outputs
| Output | Type | Meaning |
|---|---|---|
session | String | The session name, such as sample. Save it in $json and use it in later Session name fields. |
Example
Set Session name=sample, Source input=text and Payload=the JSON in Prerequisites. Save the output in the String $jsonSession$. Or make samples/document.json with the same text and set Source input=file and File path=samples/document.json.
Expected result
The output is sample, and Get node value for name gives ada. Bad JSON, an empty source, input over the limits or a file that cannot be read fails, and no document is saved.
Convert JSON to Dictionary (jsonToDictionary)
Convert the root object to a Dictionary. Each value keeps its JSON type.
Inputs
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
session | Session name | Stringdefault ""required | Shared |
Outputs
| Output | Type | Meaning |
|---|---|---|
result | Dictionary | The root keys with typed values. Nested lists become List values, and nested objects become Dictionary values. null becomes empty String. Save it in $person$. |
Example
Set Session name=sample. Save result in the Dictionary $person$.
Expected result
The Dictionary holds String name=ada, Number age=36, and the Lists tags and users. An empty object gives an empty Dictionary. A list or a single value as the root fails.
Update node value (jsonUpdateNodeValue)
Change a node that exists in the session. For a list, the value is added at the end, unless you choose to replace the list.
Inputs
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
session | Session name | Stringdefault ""required | Shared |
node | Node path | Stringdefault ""required | Shared. $ updates the root. A missing or null node fails. |
replace | Replace array node with a new value | Booleandefault falseoptional | For a list node: false adds the value at the end, and a List value adds each of its items. true replaces the whole list. Any other node is always replaced. |
Also uses the value fields.
Outputs
None.
Example
Set Session name=sample, Node path=tags, Value type=String, stringVal=z and Replace array node with a new value=false. To replace the list instead, choose Value type=List, listVal=$tags$ with only the String q, and set the replace field to true.
Expected result
The first step changes tags to ["x","y","z"]. The replace step changes it to ["q"]. No file changes.
Validate (jsonValidate)
Check the JSON format, the type of one node, or a simple schema. It needs no session. Use the valid value of the result for decisions.
Inputs
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
input | Source input | Jsondefault textoptional | file reads File path. text reads Payload. dictionary reads Dictionary variable. Only the selected source is read. |
file | File path | Stringdefault ""optional | Shared |
json | Payload | Stringdefault ""optional | For text: the JSON text, such as {"age":36}. Empty text fails the step. Bad JSON gives valid=. |
dictionary | Dictionary variable | Dictionarydefault {}optional | For dictionary: a Dictionary variable such as $person$. It is turned into JSON text first. |
validation | Validation Level | Jsondefault Formatoptional | Format: the syntax only. Node: the syntax and the type of one node. Schema: a check against JSON Schema. This is an action with a result, not a condition. |
node | Node key or path | Stringdefault ""optional | For Node: the path to check, such as age. Shared. |
value | Value type | Jsondefault Stringoptional | For Node: String, Number, Boolean, List, Dictionary or Null. It checks the JSON type and does not convert it. Null also accepts a missing path. |
json | JSON Schema | Stringdefault ""optional | For Schema: schema text, such as {"type":"object",. Only type, required, properties, items and enum are checked, and other keywords are ignored. type is one of object, array, string, boolean, number, integer or null, and an unknown type makes no type check. integer accepts any number, also with a fraction. enum compares the text of values, so 1 and "1" match. A schema that is not an object checks nothing. |
Outputs
| Output | Type | Meaning |
|---|---|---|
result | Dictionary | Boolean valid and String message. Save it in $validation$ and test $validation.valid$. The message is empty when valid, and says what is wrong when not. |
Example
Set Source input=text, Payload={"age":36}, Validation Level=Node, Node key or path=age and Value type=Number. Save result in the Dictionary $validation$. For a schema check, choose Schema and JSON Schema={"type":"object","required":["age"],"properties":{"age":{"type":"number"}}}.
Expected result
Both examples give valid=true and an empty message. With Value type=String, valid=false and the message names the mismatch. Bad JSON or a bad schema gives valid=false. A file or input error still fails the step.