类 ZonedDateTimeAdapter

java.lang.Object
com.google.gson.TypeAdapter<java.time.ZonedDateTime>
ai.nextbillion.maps.internal.ZonedDateTimeAdapter

public class ZonedDateTimeAdapter
extends com.google.gson.TypeAdapter<java.time.ZonedDateTime>
This class handles conversion from JSON to ZonedDateTimes.

Please see TypeAdapter for more detail.

  • 构造器概要

    构造器 
    构造器 说明
    ZonedDateTimeAdapter()  
  • 方法概要

    修饰符和类型 方法 说明
    java.time.ZonedDateTime read​(com.google.gson.stream.JsonReader reader)
    Read a Time object from a Directions API result and convert it to a ZonedDateTime.
    void write​(com.google.gson.stream.JsonWriter writer, java.time.ZonedDateTime value)
    This method is not implemented.

    从类继承的方法 com.google.gson.TypeAdapter

    fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

  • 方法详细资料

    • read

      public java.time.ZonedDateTime read​(com.google.gson.stream.JsonReader reader) throws java.io.IOException
      Read a Time object from a Directions API result and convert it to a ZonedDateTime.

      We are expecting to receive something akin to the following:

       {
         "text" : "4:27pm",
         "time_zone" : "Australia/Sydney",
         "value" : 1406528829
       }
       
      指定者:
      read 在类中 com.google.gson.TypeAdapter<java.time.ZonedDateTime>
      抛出:
      java.io.IOException
    • write

      public void write​(com.google.gson.stream.JsonWriter writer, java.time.ZonedDateTime value) throws java.io.IOException
      This method is not implemented.
      指定者:
      write 在类中 com.google.gson.TypeAdapter<java.time.ZonedDateTime>
      抛出:
      java.io.IOException