JSON to XML transformer
Payload transformer that converts JSON messages to XML.
Transformer that converts JSON string messages to XML.
The result of this transformation will be a complete, well-formed XML document as a String (the default), XOM document or DOM document. The layout of this document is defined by the XML schema located at:
classpath:com/emagiz/components/json/emagiz-json-1.0.xsd
Example
This JSON message:
{ "description" : "This is a JSON example.", "contents" : [ 1234, true, null, { "field1" : -1.0, "field2" : [] } ] }
Results in this XML message:
<?xml version="1.0"?> <json:object xmlns:json="http://www.emagiz.com/ns/json/1.0/"> <json:string name="description" value="This is a JSON example."/> <json:array name="contents"> <json:number value="1234"/> <json:boolean value="true"/> <json:null/> <json:object> <json:number name="field1" value="-1.0"/> <json:array name="field2"/> </json:object> </json:array> </json:object>
Result type
Sets the result type (XomDocument
, DomDocument
or String
) for the transformation.
Default is String
.
Output channel
Channel where output messages should be sent after (successfully) processing the input message.
You can select the nullChannel
here to silently drop the output messages.
Required
Input channel
Channel to consume the input messages from.
Required
Id
Name that uniquely identifies this flow component.
Required