Package com.walkfares.calendar.adaptor
Class InstantAdaptor
java.lang.Object
com.walkfares.calendar.adaptor.InstantAdaptor
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<Instant>
,com.google.gson.JsonSerializer<Instant>
public class InstantAdaptor extends Object implements com.google.gson.JsonSerializer<Instant>, com.google.gson.JsonDeserializer<Instant>
-
Constructor Summary
Constructors Constructor Description InstantAdaptor()
-
Method Summary
-
Constructor Details
-
InstantAdaptor
public InstantAdaptor()
-
-
Method Details
-
serialize
public com.google.gson.JsonElement serialize(Instant date, Type typeOfSrc, com.google.gson.JsonSerializationContext context)- Specified by:
serialize
in 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:
deserialize
in interfacecom.google.gson.JsonDeserializer<Instant>
- Throws:
com.google.gson.JsonParseException
-