Class InstantTypeAdapter
java.lang.Object
com.redis.om.spring.serialization.gson.InstantTypeAdapter
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<Instant>,com.google.gson.JsonSerializer<Instant>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) static InstantTypeAdaptercom.google.gson.JsonElement
-
Constructor Details
-
InstantTypeAdapter
public InstantTypeAdapter()
-
-
Method Details
-
serialize
public com.google.gson.JsonElement serialize(Instant instant, Type typeOfSrc, com.google.gson.JsonSerializationContext context) - Specified by:
serializein interfacecom.google.gson.JsonSerializer<Instant>
-
deserialize
public Instant deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException - Specified by:
deserializein interfacecom.google.gson.JsonDeserializer<Instant>- Throws:
com.google.gson.JsonParseException
-
getInstance
-