Class JSONMessageBodyReader

java.lang.Object
org.wso2.carbon.governance.rest.api.internal.JSONMessageBodyReader
Direct Known Subclasses:
GenericArtifactMessageBodyReader, LCStateMessageBodyReader

public abstract class JSONMessageBodyReader extends Object
  • 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 IOException
      Traverses through a json object and maps the keys and values to a Map
      Parameters:
      reader - JsonReader
      map - map that the values to be added.
      token - JsonToken
      isArray - whether the object is inside a json array
      Throws:
      IOException - If unable to parse the json object