Class CalendarJsonAdapter
- java.lang.Object
-
- org.eclipse.keyple.core.util.json.CalendarJsonAdapter
-
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<java.util.Calendar>
,com.google.gson.JsonSerializer<java.util.Calendar>
public class CalendarJsonAdapter extends java.lang.Object implements com.google.gson.JsonSerializer<java.util.Calendar>, com.google.gson.JsonDeserializer<java.util.Calendar>
JSON serializer/deserializer of aCalendar
to a string in ISO 8601 format.- Since:
- 2.2.0
-
-
Constructor Summary
Constructors Constructor Description CalendarJsonAdapter()
Builds a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Calendar
deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context)
com.google.gson.JsonElement
serialize(java.util.Calendar data, java.lang.reflect.Type typeOfSrc, com.google.gson.JsonSerializationContext context)
-
-
-
Method Detail
-
serialize
public com.google.gson.JsonElement serialize(java.util.Calendar data, java.lang.reflect.Type typeOfSrc, com.google.gson.JsonSerializationContext context)
- Specified by:
serialize
in interfacecom.google.gson.JsonSerializer<java.util.Calendar>
- Since:
- 2.2.0
-
deserialize
public java.util.Calendar deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
- Specified by:
deserialize
in interfacecom.google.gson.JsonDeserializer<java.util.Calendar>
- Throws:
com.google.gson.JsonParseException
- Since:
- 2.2.0
-
-