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 Details

  • Constructor Details

    • DateTimeAdapter

      private DateTimeAdapter()
  • Method Details

    • from

      abstract T from(Long millies)
    • from

      abstract T from(TemporalAccessor dt)
    • deserialize

      public T deserialize(com.google.gson.JsonElement jsonElement, Type type, com.google.gson.JsonDeserializationContext jsonDeserializationContext) throws com.google.gson.JsonParseException
      Specified by:
      deserialize in interface com.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:
      serialize in interface com.google.gson.JsonSerializer<T>