docs: @Override
    public String toJson() {
  
      Gson gson = new GsonBuilder()
              .registerTypeAdapterFactory(GeoJsonAdapterFactory.create())
              .registerTypeAdapterFactory(GeometryAdapterFactory.create())
              .create();
  
  
      // Empty properties -> should not appear in json string
      Feature feature = this;
      if (properties().size() == 0) {
        feature = new Feature(TYPE, bbox(), id(), geometry(), null);
      }
  
      return gson.toJson(feature);
    }