Package kong.unirest.modules.gson
Class GsonObjectMapper.DateTimeAdapter<T>
java.lang.Object
kong.unirest.modules.gson.GsonObjectMapper.DateTimeAdapter<T>
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<T>,com.google.gson.JsonSerializer<T>
- Direct Known Subclasses:
GsonObjectMapper.CalendarSerializer,GsonObjectMapper.DateAdapter,GsonObjectMapper.LocalDateAdapter,GsonObjectMapper.LocalDateTimeAdapter,GsonObjectMapper.ZonedDateAdapter
- Enclosing class:
GsonObjectMapper
private abstract static class GsonObjectMapper.DateTimeAdapter<T>
extends Object
implements com.google.gson.JsonSerializer<T>, com.google.gson.JsonDeserializer<T>
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final List<DateTimeFormatter> (package private) static final DateTimeFormatter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(com.google.gson.JsonElement jsonElement, Type type, com.google.gson.JsonDeserializationContext jsonDeserializationContext) (package private) abstract T(package private) abstract Tfrom(TemporalAccessor dt) com.google.gson.JsonElement
-
Field Details
-
FORMATTER
-
FORMATS
-
-
Constructor Details
-
DateTimeAdapter
private DateTimeAdapter()
-
-
Method Details
-
from
-
from
-
deserialize
public T deserialize(com.google.gson.JsonElement jsonElement, Type type, com.google.gson.JsonDeserializationContext jsonDeserializationContext) throws com.google.gson.JsonParseException - Specified by:
deserializein interfacecom.google.gson.JsonDeserializer<T>- Throws:
com.google.gson.JsonParseException
-
serialize
public com.google.gson.JsonElement serialize(T dateObj, Type type, com.google.gson.JsonSerializationContext jsonSerializationContext) - Specified by:
serializein interfacecom.google.gson.JsonSerializer<T>
-