Class BaseMetadataTypeGsonTypeAdapter

    • Method Detail

      • write

        public void write​(com.google.gson.stream.JsonWriter jsonWriter,
                          MetadataType metadataType)
                   throws IOException
        Given a MetadataType as parameter, this serializes it, and writes the Json object using the {@param jsonWriter}
        Specified by:
        write in class com.google.gson.TypeAdapter<MetadataType>
        Parameters:
        jsonWriter - JsonWriter instance to write the serialized object into Json
        metadataType - MetadataType instance to doSerialize
        Throws:
        IOException
      • read

        public MetadataType read​(com.google.gson.stream.JsonReader jsonReader)
                          throws IOException
        Uses the JsonReader containing the JSON representation of a MetadataType, it gets deserialized and returns the instance.
        Specified by:
        read in class com.google.gson.TypeAdapter<MetadataType>
        Parameters:
        jsonReader - which contains as root level the JSON representation of a MetadataType
        Returns:
        a MetadataType instance that represents the deserialized value of the JSON object.
        Throws:
        IOException
      • setAllowNullInput

        public void setAllowNullInput​(boolean allowNullInput)