Class FareAdapter

java.lang.Object
com.google.gson.TypeAdapter<Fare>
ai.nextbillion.maps.internal.FareAdapter

public class FareAdapter
extends com.google.gson.TypeAdapter<Fare>
This class handles conversion from JSON to Fare.
  • Constructor Summary

    Constructors 
    Constructor Description
    FareAdapter()  
  • Method Summary

    Modifier and Type Method Description
    Fare read​(com.google.gson.stream.JsonReader reader)
    Read a Fare object from the Directions API and convert to a Fare
    void write​(com.google.gson.stream.JsonWriter out, Fare value)
    This method is not implemented.

    Methods inherited from class com.google.gson.TypeAdapter

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

    Methods inherited from class java.lang.Object

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

  • Method Details

    • read

      public Fare read​(com.google.gson.stream.JsonReader reader) throws java.io.IOException
      Read a Fare object from the Directions API and convert to a Fare
      {
         "currency": "USD",
         "value": 6
       }
      Specified by:
      read in class com.google.gson.TypeAdapter<Fare>
      Throws:
      java.io.IOException
    • write

      public void write​(com.google.gson.stream.JsonWriter out, Fare value) throws java.io.IOException
      This method is not implemented.
      Specified by:
      write in class com.google.gson.TypeAdapter<Fare>
      Throws:
      java.io.IOException