code: @Override
    public LatLng read(JsonReader reader) throws IOException {
      if (reader.peek() == JsonToken.NULL) {
        reader.nextNull();
        return null;
      }
  
      double lat = 0;
      double lng = 0;
      boolean hasLat = false;
      boolean hasLng = false;
  
      reader.beginObject();
      while (reader.hasNext()) {
        String name = reader.nextName();
        if ("lat".equals(name) || "latitude".equals(name)) {
          lat = reader.nextDouble();
          hasLat = true;
        } else if ("lng".equals(name) || "longitude".equals(name)) {
          lng = reader.nextDouble();
          hasLng = true;
        }
      }
      reader.endObject();
  
      if (hasLat && hasLng) {
        return new LatLng(lat, lng);
      } else {
        return null;
      }
    }
docs: Reads in a JSON object and try to create a LatLng in one of the following formats.
  
  <pre>{
  "lat" : -33.8353684,
  "lng" : 140.8527069
  }
  
  {
  "latitude": -33.865257570508334,
  "longitude": 151.19287000481452
  }</pre>