|Table of Contents|
The ESB provides two types of message builders and formatters for JSON. The default builder and formatter keep the JSON representation intact without converting it to XML. You can access the payload content using JSON Path or XPath and convert the payload to XML at any point in the mediation flow.
Always use the same type of builder and formatter combination. Mixing different builders and formatters will cause errors at runtime.
If you want the ESB to handle JSON payloads that are sent using a media type other
For example, if the media type
When you modify the builders/formatters in Axis2 configuration, make sure that you have enabled only one correct message builder/formatter pair for a given media type.
<property name="messageType" value="application/json" scope="axis2"/>
JSON requests cannot be converted to xml if it contains invalid xml characters.
If you need to convert complex XML responses (e.g., XML with with
<property name="messageType" value="application/json/badgerfish" scope="axis2" type="STRING"/>
You will also need to ensure you register the following message builder and formatter as specified in Message Builders and Formatters.
Accessing content from JSON payloads