Class JsonContext
java.lang.Object
org.eclipse.parsson.JsonContext
Parsson configuration.
Values are composed from properties
Map, system properties and default value.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final intprivate final BufferPoolprivate static final intDefault maximum number of characters of BigDecimal source being parsed.private static final intDefault maximum value of BigInteger scale value limit.private static final intDefault maximum level of nesting.private final intprivate final boolean(package private) static final StringCustom char[] pool instance property.private final boolean -
Constructor Summary
ConstructorsConstructorDescriptionJsonContext(Map<String, ?> config, BufferPool defaultPool) Creates an instance of Parsson configuration.JsonContext(Map<String, ?> config, BufferPool defaultPool, String... properties) Creates an instance of Parsson configuration. -
Method Summary
Modifier and TypeMethodDescription(package private) int(package private) int(package private) BufferPoolconfig()(package private) ObjectcopyPropertiesMap(JsonContext instance, Map<String, ?> config, String... properties) (package private) intprivate static booleangetBooleanConfig(String propertyName, Map<String, ?> config) private static BooleangetBooleanProperty(String propertyName, Map<String, ?> config) private static booleangetBooleanSystemProperty(String propertyName) private static BufferPoolgetBufferPool(Map<String, ?> config, BufferPool defaultrPool) private static intgetIntConfig(String propertyName, Map<String, ?> config, int defaultValue) private static IntegergetIntProperty(String propertyName, Map<String, ?> config) private static IntegergetIntSystemProperty(String propertyName) private static StringgetSystemProperty(String propertyName) (package private) booleanprivate static intpropertyStringToInt(String propertyName, String propertyValue) (package private) boolean
-
Field Details
-
DEFAULT_MAX_BIGINTEGER_SCALE
private static final int DEFAULT_MAX_BIGINTEGER_SCALEDefault maximum value of BigInteger scale value limit.- See Also:
-
DEFAULT_MAX_BIGDECIMAL_LEN
private static final int DEFAULT_MAX_BIGDECIMAL_LENDefault maximum number of characters of BigDecimal source being parsed.- See Also:
-
DEFAULT_MAX_DEPTH
private static final int DEFAULT_MAX_DEPTHDefault maximum level of nesting.- See Also:
-
PROPERTY_BUFFER_POOL
Custom char[] pool instance property. Can be set in propertiesMaponly. -
config
-
bigIntegerScaleLimit
private final int bigIntegerScaleLimit -
bigDecimalLengthLimit
private final int bigDecimalLengthLimit -
depthLimit
private final int depthLimit -
prettyPrinting
private final boolean prettyPrinting -
rejectDuplicateKeys
private final boolean rejectDuplicateKeys -
bufferPool
-
-
Constructor Details
-
JsonContext
JsonContext(Map<String, ?> config, BufferPool defaultPool) Creates an instance of Parsson configuration.- Parameters:
config- aMapof provider specific properties to configure the JSON parsersdefaultPool- default char[] pool to use when no instance is configured
-
JsonContext
JsonContext(Map<String, ?> config, BufferPool defaultPool, String... properties) Creates an instance of Parsson configuration.- Parameters:
config- a map of provider specific properties to configure the JSON parsersdefaultPool- default char[] pool to use when no instance is configuredproperties- properties to store in local copy of provider specific propertiesMap
-
-
Method Details
-
config
-
config
-
bigIntegerScaleLimit
int bigIntegerScaleLimit() -
bigDecimalLengthLimit
int bigDecimalLengthLimit() -
depthLimit
int depthLimit() -
prettyPrinting
boolean prettyPrinting() -
rejectDuplicateKeys
boolean rejectDuplicateKeys() -
bufferPool
BufferPool bufferPool() -
getBufferPool
-
getIntConfig
-
getBooleanConfig
-
getIntProperty
-
getBooleanProperty
-
getIntSystemProperty
-
getBooleanSystemProperty
private static boolean getBooleanSystemProperty(String propertyName) throws jakarta.json.JsonException - Throws:
jakarta.json.JsonException
-
getSystemProperty
-
propertyStringToInt
-
copyPropertiesMap
-