Package de.xima.fc.helper
Class GsonDateTypeAdapter
java.lang.Object
com.google.gson.TypeAdapter<Date>
de.xima.fc.helper.GsonDateTypeAdapter
Adapter for serializing and deserializing
Date
objects with GSON. This code is copied from
DateTypeAdapter
and modified slightly to add the Java9+ data time format when
running in Java8 or earlier.- Author:
- XIMA MEDIA GmbH
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.google.gson.TypeAdapter
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
-
Constructor Details
-
GsonDateTypeAdapter
public GsonDateTypeAdapter() -
GsonDateTypeAdapter
Deprecated.UseGsonDateTypeAdapter()
instead- Parameters:
gson
- Ignored.
-
-
Method Details
-
write
- Specified by:
write
in classcom.google.gson.TypeAdapter<Date>
- Throws:
IOException
-
read
- Specified by:
read
in classcom.google.gson.TypeAdapter<Date>
- Throws:
IOException
-
GsonDateTypeAdapter()
instead