Class JSONMessageBodyReader
java.lang.Object
org.wso2.carbon.governance.rest.api.internal.JSONMessageBodyReader
- Direct Known Subclasses:
GenericArtifactMessageBodyReader,LCStateMessageBodyReader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidhandleJSON(com.google.gson.stream.JsonReader reader, Map<String, Object> map) protected voidhandleObject(com.google.gson.stream.JsonReader reader, Map<String, Object> map, com.google.gson.stream.JsonToken token, boolean isArray, String parentKey) Traverses through a json object and maps the keys and values to aMap
-
Constructor Details
-
JSONMessageBodyReader
public JSONMessageBodyReader()
-
-
Method Details
-
handleJSON
protected void handleJSON(com.google.gson.stream.JsonReader reader, Map<String, Object> map) throws IOException- Throws:
IOException
-
handleObject
protected void handleObject(com.google.gson.stream.JsonReader reader, Map<String, Object> map, com.google.gson.stream.JsonToken token, boolean isArray, String parentKey) throws IOExceptionTraverses through a json object and maps the keys and values to aMap- Parameters:
reader-JsonReadermap- map that the values to be added.token-JsonTokenisArray- whether the object is inside a json array- Throws:
IOException- If unable to parse the json object
-