code: @Override
    @SuppressWarnings("unused")
    public String toJson() {
  
      Gson gson = new GsonBuilder()
        .registerTypeAdapterFactory(GeometryAdapterFactory.create())
        .registerTypeAdapter(BoundingBox.class, new BoundingBoxTypeAdapter())
        .registerTypeAdapterFactory(GeocodingAdapterFactory.create())
        .create();
  
      // Empty properties -> should not appear in json string
      CarmenFeature feature = this;
      if (properties() != null && properties().size() == 0) {
        feature = toBuilder().properties(null).build();
      }
  
      return gson.toJson(feature, CarmenFeature.class);
    }
docs: This takes the currently defined values found inside this instance and converts it to a JSON
  string.
  
  @return a JSON string which represents this CarmenFeature
  @since 3.0.0