Package io.micronaut.json
Class JsonStreamConfig
java.lang.Object
io.micronaut.json.JsonStreamConfig
Configuration for json stream parsing and generation. Immutable.
- Since:
- 3.1
- Author:
- Jonas Konrad
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
withUseBigDecimalForFloats
(boolean useBigDecimalForFloats) Whether all normal floating point literals should be represented asBigDecimal
.withUseBigIntegerForInts
(boolean useBigIntegerForInts)
-
Field Details
-
DEFAULT
The default stream configuration.
-
-
Method Details
-
useBigDecimalForFloats
public boolean useBigDecimalForFloats()- Returns:
- Whether
BigDecimal
s should be used for parsing floating-point json numbers.
-
withUseBigDecimalForFloats
Whether all normal floating point literals should be represented asBigDecimal
. Note thatFloat.NaN
,Float.POSITIVE_INFINITY
andFloat.NEGATIVE_INFINITY
may still be represented as float, if the input supports those literals.- Parameters:
useBigDecimalForFloats
- The new value foruseBigDecimalForFloats
- Returns:
- A copy of this config instance, with
useBigDecimalForFloats
set to the new value.
-
useBigIntegerForInts
public boolean useBigIntegerForInts()- Returns:
- Whether
BigInteger
s should be used for parsing integer json numbers.
-
withUseBigIntegerForInts
- Parameters:
useBigIntegerForInts
- The new value foruseBigIntegerForInts
- Returns:
- A copy of this config instance, with
useBigIntegerForInts
set to the new value.
-