Class JsonProviderUtil


  • public final class JsonProviderUtil
    extends java.lang.Object
    ClassLoader related utils to avoid direct access to our JSON provider from the mapper
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private JsonProviderUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void setMaxBigDecimalScale​(jakarta.json.spi.JsonProvider provider, int value)
      Sets the max big decimal scale property on the given provider instance.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SET_MAX_BIG_DECIMAL_SCALE

        private static final java.lang.reflect.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