Search in sources :

Example 1 with JsonbAdapter

use of jakarta.json.bind.adapter.JsonbAdapter in project alias by JohT.

the class ImmutableJsonbConfig method withoutAdapterOfType.

public <T extends JsonbAdapter<?, ?>> JsonbConfig withoutAdapterOfType(Class<T> adapterType) {
    JsonbConfig newConfig = getJsonbConfig();
    Optional<Object> property = jsonbConfig.getProperty(JsonbConfig.ADAPTERS);
    newConfig.setProperty(JsonbConfig.ADAPTERS, withoutType(adapterType, contentsOf(property)).toArray(JsonbAdapter[]::new));
    return newConfig;
}
Also used : JsonbConfig(jakarta.json.bind.JsonbConfig) JsonbAdapter(jakarta.json.bind.adapter.JsonbAdapter)

Aggregations

JsonbConfig (jakarta.json.bind.JsonbConfig)1 JsonbAdapter (jakarta.json.bind.adapter.JsonbAdapter)1