public enum JsonNodeFeature extends Enum<JsonNodeFeature> implements DatatypeFeature
JsonNode
types.Enum Constant and Description |
---|
FAIL_ON_NAN_TO_BIG_DECIMAL_COERCION
Determines the behavior when coercing `NaN` to
BigDecimal with
DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS enabled.
1. |
READ_NULL_PROPERTIES
When reading
JsonNode s are null valued properties included as explicit
NullNode s in resulting ObjectNode
or skipped? |
STRIP_TRAILING_BIGDECIMAL_ZEROES
Feature that determines whether
BigDecimal values
will be "normalized" by stripping trailing zeroes off, when constructing
nodes with JsonNodeFactory.numberNode(java.math.BigDecimal) . |
WRITE_NULL_PROPERTIES
When writing
JsonNode s are null valued properties written as explicit
JSON null s or skipped? |
WRITE_PROPERTIES_SORTED
When writing
com.fasterxml.jackson.databind.JsonNode s are Object properties
(for ObjectNode s) sorted alphabetically (using natural order of
String ) or not? |
Modifier and Type | Method and Description |
---|---|
boolean |
enabledByDefault() |
boolean |
enabledIn(int flags) |
int |
featureIndex()
Internal index used for efficient storage and index; no
user serviceable contents inside!
|
int |
getMask() |
static JsonNodeFeature |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JsonNodeFeature[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JsonNodeFeature READ_NULL_PROPERTIES
JsonNode
s are null valued properties included as explicit
NullNode
s in resulting ObjectNode
or skipped?
Default value: true
public static final JsonNodeFeature WRITE_NULL_PROPERTIES
JsonNode
s are null valued properties written as explicit
JSON null
s or skipped?
Default value: true
public static final JsonNodeFeature WRITE_PROPERTIES_SORTED
com.fasterxml.jackson.databind.JsonNode
s are Object properties
(for ObjectNode
s) sorted alphabetically (using natural order of
String
) or not?
If not sorted, order is the insertion order; when reading this also means retaining
order from the input document.
Default value: false
public static final JsonNodeFeature STRIP_TRAILING_BIGDECIMAL_ZEROES
BigDecimal
values
will be "normalized" by stripping trailing zeroes off, when constructing
nodes with JsonNodeFactory.numberNode(java.math.BigDecimal)
.
If enabled, BigDecimal.stripTrailingZeros()
will be called
prior to node creation; if disabled, numeric value will be used as is.
Default value: true
(for backwards-compatibility).
public static final JsonNodeFeature FAIL_ON_NAN_TO_BIG_DECIMAL_COERCION
BigDecimal
with
DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS
enabled.
1. If set to true
, will throw an InvalidFormatException
for
attempting to coerce NaN
into BigDecimal
.
2. If set to false
, will simply let coercing NaN
into BigDecimal
happen,
regardless of how such coercion will behave --as of 2.16, will simply stay as NaN
of original
floating-point type node.
Default value is false
for backwards-compatibility, but will most likely be changed to
true
in 3.0.
public static JsonNodeFeature[] values()
for (JsonNodeFeature c : JsonNodeFeature.values()) System.out.println(c);
public static JsonNodeFeature valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean enabledByDefault()
enabledByDefault
in interface com.fasterxml.jackson.core.util.JacksonFeature
public boolean enabledIn(int flags)
enabledIn
in interface com.fasterxml.jackson.core.util.JacksonFeature
public int getMask()
getMask
in interface com.fasterxml.jackson.core.util.JacksonFeature
public int featureIndex()
DatatypeFeature
featureIndex
in interface DatatypeFeature
Copyright © 2008–2024 FasterXML. All rights reserved.