Class CalendarJsonAdapter

java.lang.Object
org.eclipse.keyple.core.util.json.CalendarJsonAdapter
All Implemented Interfaces:
com.google.gson.JsonDeserializer<Calendar>, com.google.gson.JsonSerializer<Calendar>

public class CalendarJsonAdapter extends Object implements com.google.gson.JsonSerializer<Calendar>, com.google.gson.JsonDeserializer<Calendar>
JSON serializer/deserializer of a Calendar to a string in ISO 8601 format.
Since:
2.2.0
  • Constructor Details

    • CalendarJsonAdapter

      public CalendarJsonAdapter()
      Builds a new instance.
      Since:
      2.2.0
  • Method Details

    • serialize

      public com.google.gson.JsonElement serialize(Calendar data, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<Calendar>
      Since:
      2.2.0
    • deserialize

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