2021.2

Table Of Contents
Types of JSON in Workflow
Workflow tasks that support JSON accept or output one or two of the following types of JSON:
l
a regular JSON string, containing a JSON object or an array of JSON objects
representing records. If a value in a record object is a string, it is considered to be a field
value. If a value in a record object is a JSON object, it is considered to be a nested table
with detail records. For examples, see "JSON string examples" below.
l
a JSON Record Data List (see the REST API Cookbook). A JSON Record Data List is a
proprietary JSON object type. It includes a schema entry with information about the types
of all fields at the beginning of the record, and the data set with values after the schema.
This structure allows for easy handling of REST API return values through scripting in
Workflow or in the Designer; see "JSON Record Data List example" on the next page.
JSON string examples
The following JSON string samples show various techniques to incorporate data in a JSON
string.
A simple JSON structure holding the first and last name of a person:
{
"first": "Peter",
"last": "Parker"
}
A JSON string with references to local variables and a Job Info variable (see "About
variables" on page715):
{
"first":"%{first}",
"last":"%{last}",
"email":"%2"
}
A JSON string containing a local variable and various Data Repository selections (see "Data
Repository lookups" on page57):
{
"jobid":"%{jobid}",
"account":"lookup(OLCS_jobs, account, jobid, '%{jobid}')",
"datafile_name":"lookup(OLCS_jobs, datafile_name, jobid, '%
Page 92