code: public static RouteOptions fromJson(String json) {
      GsonBuilder gson = new GsonBuilder();
      gson.registerTypeAdapterFactory(DirectionsAdapterFactory.create());
      gson.registerTypeAdapter(Point.class, new PointAsCoordinatesTypeAdapter());
      return gson.create().fromJson(json, RouteOptions.class);
    }
docs: Create a new instance of this class by passing in a formatted valid JSON String.
  
  @param json a formatted valid JSON string defining a RouteOptions
  @return a new instance of this class defined by the values passed inside this static factory
  method
  @since 3.4.0