io.quarkus.jsonp.JsonProviderHolder Maven / Gradle / Ivy
package io.quarkus.jsonp;
import jakarta.json.spi.JsonProvider;
/**
* A utility class that holds an instance of {@link JsonProvider}.
* Should be used instead of {@link jakarta.json.Json} for performance reasons.
*
* @see Json factory methods are very inefficient
*/
public final class JsonProviderHolder {
private static final JsonProvider JSON_PROVIDER = JsonProvider.provider();
private JsonProviderHolder() {
}
public static JsonProvider jsonProvider() {
return JSON_PROVIDER;
}
}