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 Details

    • TIMEZONE

      private static final String 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 interface com.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 interface com.google.gson.JsonDeserializer<ZonedDateTime>
      Throws:
      com.google.gson.JsonParseException