Class YearMonthJsonAdapter

  • All Implemented Interfaces:
    com.google.gson.JsonDeserializer<java.time.YearMonth>, com.google.gson.JsonSerializer<java.time.YearMonth>

    public class YearMonthJsonAdapter
    extends java.lang.Object
    implements com.google.gson.JsonSerializer<java.time.YearMonth>, com.google.gson.JsonDeserializer<java.time.YearMonth>
    This adapter enables accepting YearMonth time Json format.
    Since:
    10.1.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.time.YearMonth deserialize​(com.google.gson.JsonElement jsonElement, java.lang.reflect.Type type, com.google.gson.JsonDeserializationContext jsonDeserializationContext)  
      com.google.gson.JsonElement serialize​(java.time.YearMonth yearMonth, java.lang.reflect.Type type, com.google.gson.JsonSerializationContext jsonSerializationContext)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • YearMonthJsonAdapter

        public YearMonthJsonAdapter()
    • Method Detail

      • serialize

        public com.google.gson.JsonElement serialize​(java.time.YearMonth yearMonth,
                                                     java.lang.reflect.Type type,
                                                     com.google.gson.JsonSerializationContext jsonSerializationContext)
        Specified by:
        serialize in interface com.google.gson.JsonSerializer<java.time.YearMonth>
      • deserialize

        public java.time.YearMonth deserialize​(com.google.gson.JsonElement jsonElement,
                                               java.lang.reflect.Type type,
                                               com.google.gson.JsonDeserializationContext jsonDeserializationContext)
        Specified by:
        deserialize in interface com.google.gson.JsonDeserializer<java.time.YearMonth>