Class InstantAdaptor

java.lang.Object
com.walkfares.calendar.adaptor.InstantAdaptor
All Implemented Interfaces:
com.google.gson.JsonDeserializer<Instant>, com.google.gson.JsonSerializer<Instant>

public class InstantAdaptor
extends Object
implements com.google.gson.JsonSerializer<Instant>, com.google.gson.JsonDeserializer<Instant>
  • Constructor Details

  • Method Details

    • serialize

      public com.google.gson.JsonElement serialize​(Instant date, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<Instant>
    • deserialize

      public Instant 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<Instant>
      Throws:
      com.google.gson.JsonParseException