2022.2

Table Of Contents
Attribute Description Category Job Group Document Datapage Page
NumCopies
Indicates how many times
the job is set to execute,
as set when printing using
a Windows driver.
Index/Count X
Working with JSON
In online processes, it is common to send data to and retrieve data from a server. That data is often
exchanged in JSON format. JSON is short for JavaScript Object Notation. It is a way to store inform-
ation in a structured and easy-to-read format. It is often referred to as "XML without nodes" and it is
designed for exchanging data.
Refer to the following online resources for more information on JSON and its syntax:
l
www.json.org
l
www.w3schools.com
JSON support in Workflow tasks and scripts
PlanetPress Workflow offers JSON support in and via the following tasks:
l
The "XML/JSON Conversion" on page405 task converts an XML job file to JSON or a JSON job
file to XML.
l
The following OL Connect tasks accept JSON data as input: "Create Email Content" on
page502, "Create Print Content" on page515, "Create Web Content" on page518, "Render
Email Content" on page535, and the "Create Preview PDF" on page511 task.
l
When the OL Connect "Execute Data Mapping" on page524 task or the OL Connect "Retrieve
Items" on page538 task is set to output Records in JSON, it outputs a JSON Record Data List
(see "Types of JSON in Workflow" below).
l
The OL Connect Send "Get Data" on page483 task can output its results to a JSON file.
In scripts written in any JSON-aware language (including JavaScript), JSON is obviously supported.
Certain methods in the "Data Repository API" on page146 accept or return JSON data.
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" on the next page.
Page 77