Package org.apache.axis2.json
Class JSONMessageFormatter
- java.lang.Object
-
- org.apache.axis2.json.AbstractJSONMessageFormatter
-
- org.apache.axis2.json.JSONMessageFormatter
-
- All Implemented Interfaces:
MessageFormatter
public class JSONMessageFormatter extends AbstractJSONMessageFormatter
This JSONMessageFormatter is the formatter for "Mapped" formatted JSON in Axis2. This type of JSON strings are really easy to use in Javascript. Eg: <out><in>mapped JSON</in></out> is converted to... {"out":{"in":"mapped JSON"}} WARNING: We do not support "Mapped" JSON Strings with *namespaces* in Axis2. This convention is supported in Axis2, with the aim of making Javascript users' life easy (services written in Javascript). There are no namespaces used in Javascript. If you want to use JSON with namespaces, use the JSONBadgerfishMessageForatter (for "Badgerfish" formatted JSON) which supports JSON with namespaces.
-
-
Constructor Summary
Constructors Constructor Description JSONMessageFormatter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected XMLStreamWriter
getJSONWriter(Writer writer, MessageContext messageContext)
-
Methods inherited from class org.apache.axis2.json.AbstractJSONMessageFormatter
formatSOAPAction, getContentType, getTargetAddress, writeTo
-
-
-
-
Method Detail
-
getJSONWriter
protected XMLStreamWriter getJSONWriter(Writer writer, MessageContext messageContext) throws XMLStreamException
- Specified by:
getJSONWriter
in classAbstractJSONMessageFormatter
- Throws:
XMLStreamException
-
-