Class DateJsonSerializer

  • All Implemented Interfaces:
    com.google.gson.JsonSerializer<java.util.Date>

    public class DateJsonSerializer
    extends java.lang.Object
    implements com.google.gson.JsonSerializer<java.util.Date>
    JSON serializer of a Date to a string in ISO 8601 format.
    Since:
    2.2.0
    • Constructor Summary

      Constructors 
      Constructor Description
      DateJsonSerializer()
      Builds a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.gson.JsonElement serialize​(java.util.Date data, java.lang.reflect.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 Detail

      • DateJsonSerializer

        public DateJsonSerializer()
        Builds a new instance.
        Since:
        2.2.0
    • Method Detail

      • serialize

        public com.google.gson.JsonElement serialize​(java.util.Date data,
                                                     java.lang.reflect.Type typeOfSrc,
                                                     com.google.gson.JsonSerializationContext context)
        Specified by:
        serialize in interface com.google.gson.JsonSerializer<java.util.Date>
        Since:
        2.2.0