2018.2

Table Of Contents
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 information 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 page360 task converts an XML job file to JSON or a
JSON job file to XML.
l OL Connect Content Creation tasks ("Create Email Content" on page500, "Create Print
Content" on page515 and "Create Web Content" on page518) and the OL Connect
"Create Preview PDF" on page510 task accept JSON data as input.
l
When the OL Connect "Retrieve Items" on page533 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 page480 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 page161 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 samples" on page513.
Page 80