Class JsonProviderUtil


  • public final class JsonProviderUtil
    extends Object
    ClassLoader related utils to avoid direct access to our JSON provider from the mapper
    • Field Detail

      • SET_MAX_BIG_DECIMAL_SCALE

        private static final Method SET_MAX_BIG_DECIMAL_SCALE
    • Constructor Detail

      • JsonProviderUtil

        private JsonProviderUtil()
    • Method Detail

      • setMaxBigDecimalScale

        public static void setMaxBigDecimalScale​(jakarta.json.spi.JsonProvider provider,
                                                 int value)
        Sets the max big decimal scale property on the given provider instance.

        This method is intentionally not receiving the property name, so we know exactly what will be passed in and what the method is supposed to set on the provider.

        If the provider is not an instance of our JohnzonProviderImpl (org.apache.johnzon.core.JsonProviderImpl), the method is a noop.

        Parameters:
        provider - the provider to configure. Must be an instance of org.apache.johnzon.core.JsonProviderImpl
        value - the max big decimal scale to set on the provider