The JSONTODATA workflow application lets you parse JSON content into process data.
The application requires either the JSON_CONTENT
or the JSON_CONTENT_FILE
parameter; these correspond to the JSON to parse.
The application supports the JSONPath query language (see GitHub - json-path/JsonPath: Java JsonPath implementation), which allows extraction of specific data from JSON content, similar to XPath expressions in XML.
Parameters
Parameter | Type | Direction | Description |
---|---|---|---|
JSON_CONTENT |
TEXT | IN | Query to execute |
JSON_CONTENT_FILE |
TEXT | IN | Query to execute, stored in a file |
Parameter mapping
Using simple parameter names
The application supports custom OUT parameters to map simple JSON content.
Example
{
"person": {
"address": {
"street": "160 Guy Street",
"zipcode": "J4G 1U4"
},
"age": 30,
"name": "John"
}
}
The following parameters allow you to map the JSON content to different process data:
Parameter | Type | Direction | Retrieve value into | Result |
---|---|---|---|---|
person.address.street |
TEXT | OUT | DATA_STREET |
160 Guy Street |
person.address.zipcode |
TEXT | OUT | DATA_ZIPCODE |
J4G 1U4 |
person.age |
TEXT | OUT | DATA_AGE |
30 |
person.name |
TEXT | OUT | DATA_NAME |
John |
Using JSONPath query language
The application supports the JSONPath query language, similar to XPath expressions in XML. This language allows you to retrieve specific data from a JSON. For more information and an example, see the JSONTODATA Workflow Application section in the WorkflowGen Administration Guide.