Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Supported XML and JSON Conversion : Supported Schema Types for Formatting XML Data

Supported Schema Types for Formatting XML Data
TIBCO ActiveMatrix BusinessWorksTM Plug-in for REST and JSON supports mapping XML data with the following schema types:
TIBCO ActiveMatrix BusinessWorksTM Plug-in for REST and JSON supports different implementation mechanisms when converting between JSON data and XML data based on the XSD schema type. You can select an implementation mechanism by configuring the com.tibco.plugin.restjson.json.111CompatibleMode property.
If you set this property to false or do not add the property, XSD schemas are used for converting data between XML and JSON.
If you set this property to true, XSD schemas are not used for converting data between XML and JSON, they are used for mapping and validating XML data. Besides, the XSD schema type decides which data types and elements are preserved according to the element definition in XSD when rendering JSON.
See Implementation Mechanism Exchange for Parsing and Rendering for details about how to change the approach.
Generic
TIBCO ActiveMatrix BusinessWorksTM Plug-in for REST and JSON supports conversion of JSON strings to XML strings and vice versa.
XSD
TIBCO ActiveMatrix BusinessWorksTM Plug-in for REST and JSON supports converting a JSON string to the structured XML data with an XML schema and vice versa.
If you do not select the Badgerfish check box, the XML schema handles the JSON data based on the definition in XSD when parsing JSON data to XML data.
Java Classes
TIBCO ActiveMatrix BusinessWorksTM Plug-in for REST and JSON supports conversion of a JSON string to structured XML data with a POJO JAR file, and vice versa.
The plug-in generates XSD based on the given root of the Java class. The simple name of the Java class root name is mapped to the XSD root element in lowercase. The fields of the root class are mapped to the XSD sub-elements. The elements in the converted XSD are surrounded with the xsd:all group type.
Conversion is not supported for Java collection. In the mapping, the supported Java collection is surrounded with the xsd:all group type. If the Validate Output check box or the Validate Input check box is selected when running the Parse JSON activity or the Render JSON activity, a validation error message is generated.
Supported Data Types
Table 2 lists the supported data types defined in POJO for conversion.
 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved