- All Implemented Interfaces:
com.google.gson.JsonSerializer<Date>
public class DateJsonSerializer
extends Object
implements com.google.gson.JsonSerializer<Date>
JSON serializer of a
Date
to a string in ISO 8601 format.
- Since:
- 2.2.0
-
Constructor Summary
Constructors
-
Method Summary
com.google.gson.JsonElement
serialize(Date data,
Type typeOfSrc,
com.google.gson.JsonSerializationContext context)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
DateJsonSerializer
public DateJsonSerializer()
Builds a new instance.
- Since:
- 2.2.0
-
Method Details
-
serialize
public com.google.gson.JsonElement serialize(Date data,
Type typeOfSrc,
com.google.gson.JsonSerializationContext context)
- Specified by:
serialize
in interface com.google.gson.JsonSerializer<Date>
- Since:
- 2.2.0