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


Appendix A Advanced Topics : Implementation Mechanism Exchange for Parsing and Rendering

Implementation Mechanism Exchange for Parsing and Rendering
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.
This section uses an example to show the output of an implementation mechanism varies with the value of com.tibco.plugin.restjson.json.111CompatibleMode property. It also specifies how to select an implementation mechanism by configuring this property.
Example
Different implementation mechanisms affect the output when you convert data between JSON and XML format based on the XSD.
For example, when paring JSON data to XML data based on the provided XSD schemas, if you set the com.tibco.plugin.restjson.json.111CompatibleMode property to true, the attribute information in JSON is converted to a common XML element. Figure 33 shows an example of input data, and Figure 34 shows an example of output data.
Figure 33 JSON Input
 
Figure 34 Output Results When Property Is True
 
In the selected XSD file, "age" is defined as an attribute. When you set the property to false, the JSON pairs "age": "30" are converted to XML attributes and namespaces are added according to selected XSD file as shown in Figure 35.
Figure 35 Output Results When Property Is False
 
Selecting Implementation Mechanism
You can select an implementation mechanism supported in different product versions by configuring the com.tibco.plugin.restjson.json.111CompatibleMode property. The default value of this property is false indicating that the current version of implementation mechanism is adopted.
To select an implementation mechanism:
1.
Navigate to the TIBCO_HOME\designer\version_number\bin directory.
2.
Open the designer.tra file.
3.
Add the com.tibco.plugin.restjson.json.111CompatibleMode property and set its value:
The true value indicates that the implementation mechanism in previous versions is adopted.
The false value indicates that the implementation mechanism in the current version is adopted.
4.

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