Parse JSON activity takes the JSON data, processes it, and converts it into XML data.
General tab has the following fields.
||Literal Value/Process Property/Module Property
||The name to display as the label for the activity in the process.
||Specifies the mode for the output data. The following are the supported schema types:
- Generic: converts a JSON string to an XML string
- XSD: converts a JSON string to an XML document defined using a schema specified in the
The default value in this field is the XSD schema type.
||Specifies the following conversion rules:
- Select this check box for converting JSON data to XML data with the mapping of XML namespace, XML attribute, CDATA, and so on.
- Do not select this check box if you want normal conversion rules for mapping data from JSON to XML.
| Input Json Style
Specifies the method to parse the data.
- None : Select this option to exclude the root element in the Json string.
- Json with Root
: Select this option to include the root element in the input Json string.
- Anonymous Array
: Select this option to accept a Json array without the parent element, where the root element has exactly one child of the type Array.
|Use Null For Empty Values
Select the check box to use null in the place of empty values in the JSON. This option is applicable only for Objects and Arrays. This has no effect on primitive types. By default, the check box is not selected.
Provide a short description for the activity.
Output Editor you can define or reference an XML schema for the activity output. You can use the
BW JSON Utils tool to generate an XML schema file with a specified JSON file. For more information, see
BW JSON Utils for more information.
Input tab has the following fields.
||The input JSON data for translation.
The output for the
Parse JSON activity varies depending on the data schema you specified in the
Schema Type field on the
Fault tab lists the possible exceptions thrown by this activity. For more information about error codes and the corrective action to take, see See
||An exception occurred when parsing the JSON data.