Class GsonJavaTimeAdapter.PeriodAdapter

  • Enclosing class:
    GsonJavaTimeAdapter

    public static class GsonJavaTimeAdapter.PeriodAdapter
    extends com.google.gson.TypeAdapter<Period>
    Type adapter for Period. Serialized representation is a JSON object with the years and month, and days properties.
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • PeriodAdapter

        public PeriodAdapter()
    • Method Detail

      • read

        public Period read​(com.google.gson.stream.JsonReader in)
                    throws IOException
        Specified by:
        read in class com.google.gson.TypeAdapter<Period>
        Throws:
        IOException
      • write

        public void write​(com.google.gson.stream.JsonWriter out,
                          Period value)
                   throws IOException
        Specified by:
        write in class com.google.gson.TypeAdapter<Period>
        Throws:
        IOException