Package dev.plex.util.adapter
Class ZonedDateTimeAdapter
java.lang.Object
dev.plex.util.adapter.ZonedDateTimeAdapter
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<ZonedDateTime>
,com.google.gson.JsonSerializer<ZonedDateTime>
public class ZonedDateTimeAdapter
extends Object
implements com.google.gson.JsonSerializer<ZonedDateTime>, com.google.gson.JsonDeserializer<ZonedDateTime>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) com.google.gson.JsonElement
serialize
(ZonedDateTime src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
-
Field Details
-
TIMEZONE
-
-
Constructor Details
-
ZonedDateTimeAdapter
public ZonedDateTimeAdapter()
-
-
Method Details
-
serialize
public com.google.gson.JsonElement serialize(ZonedDateTime src, Type typeOfSrc, com.google.gson.JsonSerializationContext context) - Specified by:
serialize
in interfacecom.google.gson.JsonSerializer<ZonedDateTime>
-
deserialize
public ZonedDateTime 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<ZonedDateTime>
- Throws:
com.google.gson.JsonParseException
-