Class Timestamp.Deserializer

  • All Implemented Interfaces:
    com.google.gson.JsonDeserializer<Timestamp>
    Enclosing class:
    Timestamp

    public static class Timestamp.Deserializer
    extends Object
    implements com.google.gson.JsonDeserializer<Timestamp>
    Deserializer to convert JSON to Timestamp
    • Constructor Detail

      • Deserializer

        public Deserializer()
    • Method Detail

      • deserialize

        public Timestamp deserialize​(com.google.gson.JsonElement json,
                                     Type typeOfT,
                                     com.google.gson.JsonDeserializationContext context)
                              throws com.google.gson.JsonParseException
        Deserializes JSON to a Timestamp
        Specified by:
        deserialize in interface com.google.gson.JsonDeserializer<Timestamp>
        Parameters:
        json - The JsonElement containing the Timestamp
        typeOfT - The Type to use
        context - The JsonDeserializationContext to use
        Returns:
        A Timestamp containing the data in the JsonElement
        Throws:
        com.google.gson.JsonParseException