XML to JSON transformer
Payload transformer that converts XML messages to JSON.
Transformer that converts XML messages to a JSON string.
The input of this transformation must be a complete, well-formed XML document as a XOM Document, DOM Document, String, File, Reader or InputStream. This document must validate against the XML schema located at:
classpath:com/emagiz/components/json/emagiz-json-1.0.xsd
Example
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>
Results in this JSON message:
{ "description" : "This is a JSON example.", "contents" : [ 1234, true, null, { "field1" : -1.0, "field2" : [] } ] }
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