Parse

Use the Parse activity to extract information from the data object. The Parse activity takes input string (JSON, TOML, XML, and YAML) and converts it into a JSON structure based on the specified data. You can then assign the JSON structure to a variable using a JSON path expression. 

The following sections enable you to configure the Parse activity:

General Settings

Parameter

Description

Activity Label

Enter a name for the activity.

Activity Description

(Optional) Enter a description for the activity

Parse Settings

Parameter

Description

Input Variable

Specifies the variable that stores the data object to use for parsing.

Content Type

Specifies the expected content type of the data object. JSON, TOML, XML, and YAML are supported content types.

Output Variable

Choose a variable to contain the data from a specific section of the HTTP Request response object.

Path Expression

Define the Path Expression for parsing the response object. Depending on the response object data structure and the reason to extract a subset of information, the Path Expression varies.

Data is normalized to an object hierarchy before Path Expression execution, so JSONPath is used in the response object regardless of the configured Content Type.

Path Expressions should confirm to Jayway JSONPath expressions. For more information, see https://github.com/json-path/JsonPath.

Content Type Formats

The following examples describe sample input Content Type formats and the JSON response.

Content Type XML

Use this tool to convert XML into JSON format https://www.convertjson.com/xml-to-json.htm.

XML Input Format:

<note>
  <to>Tove</to>
  <from>Jani</from>
  <heading>Reminder</heading>
  <body>Test application</body>
</note>

Data/JSON Normalized Response

{
   "note": {
      "to": "Tove",
      "from": "Jani",
      "heading": "Reminder",
      "body": "Test application"
   }
}

Example JSON Path Expression: Use $.note.from to get the value as Jani.

Content Type TOML

Use this tool to convert TOML to JSON format https://www.convertjson.com/toml-to-json.htm.

TOML Input Format:

title = "TOML Example"
[owner]
name = "Tom Preston-Werner"
dob = 1979-05-27T07:32:00-08:00

Data/JSON Normalized Response

{
   "title": "TOML Example",
   "owner": {
      "name": "Tom Preston-Werner",
      "dob": "1979-05-27T15:32:00.000Z"
   }
}

Example JSON Path Expression: Use $.owner.name to get the value as ‘Tom Preston-Werner’.

Content Type YAML

Use this tool to convert YAML to JSON format https://www.convertjson.com/yaml-to-json.htm.

YAML Input Format:

# An employee record
martin:
  name: Martin D'vloper
  job: Developer
  skill: Elite

Data/JSON Normalized Response

{
   "martin": {
      "name": "Martin D'vloper",
      "job": "Developer",
      "skill": "Elite"
   }
}

Example JSON Path Expression: Use $.martin.job to get the value Developer.

Content Type JSON

Use the JSON Expression Evaluator https://jsonpath.herokuapp.com/.

JSON Input Format:

{
   "martin": {
      "name": "Martin D'vloper",
      "job": "Developer",
      "skill": "Elite"
   }
}

Data/JSON Normalized Response

{
   "martin": {
      "name": "Martin D'vloper",
      "job": "Developer",
      "skill": "Elite"
   }
}

Example JSON Path Expression: Use $.martin.job to get the value Developer.