Validate JSON activity

During run time, the Validate JSON activity determines if the input JSON or XML data is valid to the specified XML schema.

The Validate JSON activity has the following limitations:

Note: You must upload an XSD file (ends in the .xsd extension) that contains the XML schema into the project before configuring the Validate JSON activity. Upload the XML schema into the project that is used to validate the JSON data during run time.
The following table describes the result when an error or warning occurs when the Validate JSON activity is parsing JSON or XML data against an XML schema.
Table 1.
Error/Warning Type Description Example Result
Fatal Error Parsing of the JSON data fails because of a severe problem and the parsing cannot continue. For example, the JSON or XML data is not valid to the XML schema. The JSON or XML data is not valid to the XML schema. For example, the XML schema defines that there should be a root element called <d> but the JSON or XML data contains the root element called <a>. When a fatal error occurs, the current orchestration job stops processing— even the processing of the Validate JSON activity does not complete. In addition, the activities in the orchestration after the Validate JSON activity are not processed. The value returned from the Validate JSON activity for the success output parameter is false but since the activity never completes, nothing is returned.
Error (recoverable) An error occurs during the parsing of JSON data but does not prevent parsing of the remaining data. A JSON element in an integer but a string is provided as a value: <a><count>two</count></a> If only recoverable errors or warnings occur during parsing, the processing of the Validate JSON activity completes and the activities in the orchestration after the Validate JSON activity are processed. The value of false is returned from the success output parameter.
Warning A warning occurs during the parsing of JSON data but does not prevent parsing of the remaining data   If only warnings occur during parsing, the processing of the Validate JSON activity completes and the activities in the orchestration after the Validate JSON activity are processed. The value of true is returned from the success output parameter.



Feedback | Notices


Timestamp icon Last updated: Wednesday, 15 June 2016


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/Validate_json_activity.html