2018.1

Table Of Contents
l www.json.org
l www.w3schools.com
JSON string samples
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 Job Info 2:
{
"first":"%{first}",
"last":"%{last}",
"email":"%2"
}
A JSON string containing a local variable and various lookups:
{
"jobid":"%{jobid}",
"account":"lookup(OLCS_jobs, account, jobid, '%{jobid}')",
"datafile_name":"lookup(OLCS_jobs, datafile_name, jobid, '%
{jobid}')",
"pages":"lookup(OLCS_jobs, pages, jobid, '%{jobid}')",
"documents":"lookup(OLCS_jobs, documents, jobid, '%{jobid}')",
"recordsetid":"lookup(OLCS_jobs, recordsetid, jobid, '%{jobid}')"
}
An example where the entire JSON string is provided in Job Info 1:
%1
A JSON string constructed with information retrieved from an XML job data file:
{
"first":"xmlget('/request[1]/values[1]/first
Page 470