Class JsonElementTypeAdapter


  • public class JsonElementTypeAdapter
    extends com.google.gson.TypeAdapter<java.lang.Object>
    A type adapter that reads every input into a tree of JsonElements.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  JsonElementTypeAdapter.Factory
      This factory should not be registered with a GsonBuilder because it always matches.
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonElementTypeAdapter​(com.google.gson.Gson gson)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.gson.JsonElement read​(com.google.gson.stream.JsonReader in)  
      void write​(com.google.gson.stream.JsonWriter out, java.lang.Object value)  
      • Methods inherited from class com.google.gson.TypeAdapter

        fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JsonElementTypeAdapter

        public JsonElementTypeAdapter​(com.google.gson.Gson gson)
    • Method Detail

      • read

        public com.google.gson.JsonElement read​(com.google.gson.stream.JsonReader in)
                                         throws java.io.IOException
        Specified by:
        read in class com.google.gson.TypeAdapter<java.lang.Object>
        Throws:
        java.io.IOException
      • write

        public void write​(com.google.gson.stream.JsonWriter out,
                          java.lang.Object value)
                   throws java.io.IOException
        Specified by:
        write in class com.google.gson.TypeAdapter<java.lang.Object>
        Throws:
        java.io.IOException