JSON Converter 2.0
This adapter converts a text document containing structured data in JJavaScript Object Notation (JSON) to an XML document, and conversely converts an XML document to a UTF-8 encoded JSON document. In doing so, the adapter uses a new XML format that allows better control of the generated JSON document.
This adapter replaces the deprecated JSON Converter.
Properties
Operation | Determines which operation the adapter executes Possible values:
|
Parameters
Adapter | Main class of the adapter (do not change!) Possible values: |
allowBareObjectKeys | Information on how to handle Object Keys that are not enclosed in quotation marks Possible values:
|
escapeStringInXml | Information about handling non-XML characters Possible values:
|
emptyStringAsNull | Output empty strings as Possible values:
|
The XML2JSON
operation ignores whitespaces at the beginning and end of the value for numeric and boolean values.
Status values
1 | The operation was executed successfully. |
-1 | The operation failed due to a technical error. |
Example
The following examples show JSON expressions and their respective equivalents in XML.
JSON | XML |
---|---|
JS
|
XML
|
JS
|
XML
|
JS
|
XML
|
JS
|
XML
|
JS
|
XML
|
JS
|
XML
|
JS
|
XML
|
JS
|
XML
XML
|
JS
|
XML
|
JS
|
XML
|
JS
|
XML
|
JS
|
XML
|
JS
|
XML
|