- Contents
Interaction Designer REST API Tools Developer's Guide
JSON Parser
This REST tool outputs a list of names and a list of values from a JSON object. If you have nested objects, the parser places the entire nested object in the values list as a string. To parse nested JSON objects fully, use multiple JSON Parser steps.
Important!
-
Names must be unique. If names aren't unique, JSON Parser does not throw an error, but the JSON is not correctly parsed. For example,
{does not cause an error, but is not parsed correctly.user
:johndoe
,user
:janedoe
} -
Starting with Interaction Designer 2017 R3, JSON Parser can parse a JSON object that includes these keywords: break, case, catch, class, const, continue, debugger, default, delete, do, else, enum, export, extends, finally, for, function, if, implements, import, in, instanceof, interface, let, new, package, private, protected, public, return, static, super, switch, this, throw, try, var, void, while, with, yield. Previously, a JSON object that contained a keyword would cause the JSON Parser to exit with the failure path.
JSON Parser example
Given the following JSON object, JSON Parser returns three list of string variables: one for the names, one for the values, and one for the data types of each item.
{
"user": "johndoe",
"admin": false,
"uid": 1000,
"groups": ["users", "wheel", "audio",
"video"], "innerJSON": {
"observer": "janedoe",
"readonly": true,
"uid": 1001,
"watchlists": ["Aveeno", "Purell",
"Blistex", "Carmex"]
}
}

