@Override
  public Fare read(JsonReader reader) throws IOException {
    if (reader.peek() == JsonToken.NULL) {
      reader.nextNull();
      return null;
    }

    Fare fare = new Fare();
    reader.beginObject();
    while (reader.hasNext()) {
      String key = reader.nextName();
      if ("currency".equals(key)) {
        fare.currency = Currency.getInstance(reader.nextString());
      } else if ("value".equals(key)) {
        // this relies on nextString() being able to coerce raw numbers to strings
        fare.value = new BigDecimal(reader.nextString());
      } else {
        // Be forgiving of unexpected values
        reader.skipValue();
      }
    }
    reader.endObject();

    return fare;
  }
Read a Fare object from the Directions API and convert to a {@link com.google.maps.model.Fare}

<pre>{
  "currency": "USD",
  "value": 6
}</pre>
src/main/java/com/google/maps/internal/FareAdapter.java