Package kong.unirest.modules.gson
Class GsonObjectMapper.DateAdapter
java.lang.Object
kong.unirest.modules.gson.GsonObjectMapper.DateTimeAdapter<Date>
kong.unirest.modules.gson.GsonObjectMapper.DateAdapter
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<Date>
,com.google.gson.JsonSerializer<Date>
- Enclosing class:
GsonObjectMapper
-
Field Summary
Fields inherited from class kong.unirest.modules.gson.GsonObjectMapper.DateTimeAdapter
FORMATS, FORMATTER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) Date
(package private) Date
from
(TemporalAccessor dt) com.google.gson.JsonElement
private Instant
Methods inherited from class kong.unirest.modules.gson.GsonObjectMapper.DateTimeAdapter
deserialize
-
Constructor Details
-
DateAdapter
private DateAdapter()
-
-
Method Details
-
from
- Specified by:
from
in classGsonObjectMapper.DateTimeAdapter<Date>
-
from
- Specified by:
from
in classGsonObjectMapper.DateTimeAdapter<Date>
-
toInstant
-
serialize
public com.google.gson.JsonElement serialize(Date date, Type type, com.google.gson.JsonSerializationContext jsonSerializationContext) - Specified by:
serialize
in interfacecom.google.gson.JsonSerializer<Date>
- Overrides:
serialize
in classGsonObjectMapper.DateTimeAdapter<Date>
-