Class OffsetDateTimeJsonAdapter
- java.lang.Object
-
- com.prowidesoftware.swift.model.mx.adapters.OffsetDateTimeJsonAdapter
-
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<java.time.OffsetDateTime>,com.google.gson.JsonSerializer<java.time.OffsetDateTime>
public class OffsetDateTimeJsonAdapter extends java.lang.Object implements com.google.gson.JsonSerializer<java.time.OffsetDateTime>, com.google.gson.JsonDeserializer<java.time.OffsetDateTime>This adapter enables accepting OffsetDateTime time Json format.The adapter supports two DTO formats: the current one and the legacy one based on XMLGregorianCalendar model with Java 1.8.
- Since:
- 10.0.1
-
-
Constructor Summary
Constructors Constructor Description OffsetDateTimeJsonAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.time.OffsetDateTimedeserialize(com.google.gson.JsonElement jsonElement, java.lang.reflect.Type type, com.google.gson.JsonDeserializationContext jsonDeserializationContext)com.google.gson.JsonElementserialize(java.time.OffsetDateTime offsetDateTime, java.lang.reflect.Type type, com.google.gson.JsonSerializationContext jsonSerializationContext)
-
-
-
Method Detail
-
serialize
public com.google.gson.JsonElement serialize(java.time.OffsetDateTime offsetDateTime, java.lang.reflect.Type type, com.google.gson.JsonSerializationContext jsonSerializationContext)- Specified by:
serializein interfacecom.google.gson.JsonSerializer<java.time.OffsetDateTime>
-
deserialize
public java.time.OffsetDateTime deserialize(com.google.gson.JsonElement jsonElement, java.lang.reflect.Type type, com.google.gson.JsonDeserializationContext jsonDeserializationContext)- Specified by:
deserializein interfacecom.google.gson.JsonDeserializer<java.time.OffsetDateTime>
-
-