Class DateJsonSerializer

java.lang.Object
io.jmix.ui.widget.serialization.DateJsonSerializer
All Implemented Interfaces:
com.google.gson.JsonDeserializer<Date>, com.google.gson.JsonSerializer<Date>

public class DateJsonSerializer extends Object implements com.google.gson.JsonSerializer<Date>, com.google.gson.JsonDeserializer<Date>
  • Field Details

    • DATE_FORMAT

      public static final String DATE_FORMAT
      See Also:
    • DATE_FORMATTER

      public static final org.apache.commons.lang3.time.FastDateFormat DATE_FORMATTER
  • Constructor Details

    • DateJsonSerializer

      public DateJsonSerializer()
  • Method Details

    • serialize

      public com.google.gson.JsonElement serialize(Date src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<Date>
    • deserialize

      public Date deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
      Specified by:
      deserialize in interface com.google.gson.JsonDeserializer<Date>
      Throws:
      com.google.gson.JsonParseException