Top Description Fields Constructors Methods
com.fasterxml.jackson.databind.cfg

public final Enum JsonNodeFeature

extends Enum<JsonNodeFeature>
implements DatatypeFeature
Class Inheritance
All Implemented Interfaces
com.fasterxml.jackson.databind.cfg.DatatypeFeature, com.fasterxml.jackson.core.util.JacksonFeature

New Datatype-specific configuration options related to handling of com.fasterxml.jackson.databind.JsonNode types.
Since
2.14

Field Summary

Modifier and TypeField and Description
private final boolean
_enabledByDefault

Whether feature is enabled or disabled by default.

private final int
private static final int
public static final JsonNodeFeature
READ_NULL_PROPERTIES

When reading com.fasterxml.jackson.databind.JsonNodes are null valued properties included as explicit NullNodes in resulting com.fasterxml.jackson.databind.node.ObjectNode or skipped?

public static final JsonNodeFeature
STRIP_TRAILING_BIGDECIMAL_ZEROES

Feature that determines whether java.math.BigDecimal values will be "normalized" by stripping trailing zeroes off, when constructing nodes with com.fasterxml.jackson.databind.node.JsonNodeFactory#numberNode(java.math.BigDecimal).

public static final JsonNodeFeature
WRITE_NULL_PROPERTIES

When writing JsonNodes are null valued properties written as explicit JSON nulls or skipped?

public static final JsonNodeFeature
WRITE_PROPERTIES_SORTED

When writing com.fasterxml.jackson.databind.JsonNodes are Object properties (for ObjectNodes) sorted alphabetically (using natural order of java.lang.String) or not?

Constructor Summary

AccessConstructor and Description
private
JsonNodeFeature(boolean enabledByDefault)

Method Summary

Modifier and TypeMethod and Description
public boolean
enabledByDefault()

Implements com.fasterxml.jackson.core.util.JacksonFeature.enabledByDefault.

Accessor for checking whether this feature is enabled by default.
public boolean
enabledIn(int
Bit field that contains a set of enabled features of this type
flags
)

Implements com.fasterxml.jackson.core.util.JacksonFeature.enabledIn.

Convenience method for checking whether feature is enabled in given bitmask.
public int
featureIndex()

Implements com.fasterxml.jackson.databind.cfg.DatatypeFeature.featureIndex.

Internal index used for efficient storage and index; no user serviceable contents inside!
public int
getMask()

Implements com.fasterxml.jackson.core.util.JacksonFeature.getMask.

Returns bit mask for this feature instance; must be a single bit, that is of form 1 << N.
public static JsonNodeFeature
public static JsonNodeFeature[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

_enabledByDefaultback to summary
private final boolean _enabledByDefault

Whether feature is enabled or disabled by default.

_maskback to summary
private final int _mask
FEATURE_INDEXback to summary
private static final int FEATURE_INDEX
READ_NULL_PROPERTIESback to summary
public static final JsonNodeFeature READ_NULL_PROPERTIES

When reading com.fasterxml.jackson.databind.JsonNodes are null valued properties included as explicit NullNodes in resulting com.fasterxml.jackson.databind.node.ObjectNode or skipped?

Default value: true

STRIP_TRAILING_BIGDECIMAL_ZEROESback to summary
public static final JsonNodeFeature STRIP_TRAILING_BIGDECIMAL_ZEROES

Feature that determines whether java.math.BigDecimal values will be "normalized" by stripping trailing zeroes off, when constructing nodes with com.fasterxml.jackson.databind.node.JsonNodeFactory#numberNode(java.math.BigDecimal). If enabled, java.math.BigDecimal#stripTrailingZeros() will be called prior to node creation; if disabled, numeric value will be used as is.

Default value: true (for backwards-compatibility).

Since
2.15
WRITE_NULL_PROPERTIESback to summary
public static final JsonNodeFeature WRITE_NULL_PROPERTIES

When writing JsonNodes are null valued properties written as explicit JSON nulls or skipped?

Default value: true

WRITE_PROPERTIES_SORTEDback to summary
public static final JsonNodeFeature WRITE_PROPERTIES_SORTED

When writing com.fasterxml.jackson.databind.JsonNodes are Object properties (for ObjectNodes) sorted alphabetically (using natural order of java.lang.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

Since
2.16

Constructor Detail

JsonNodeFeatureback to summary
private JsonNodeFeature(boolean enabledByDefault)

Method Detail

enabledByDefaultback to summary
public boolean enabledByDefault()

Implements com.fasterxml.jackson.core.util.JacksonFeature.enabledByDefault.

Doc from com.fasterxml.jackson.core.util.JacksonFeature.enabledByDefault.

Accessor for checking whether this feature is enabled by default.

Returns:boolean

Whether this instance is enabled by default or not

Annotations
@Override
enabledInback to summary
public boolean enabledIn(int flags)

Implements com.fasterxml.jackson.core.util.JacksonFeature.enabledIn.

Doc from com.fasterxml.jackson.core.util.JacksonFeature.enabledIn.

Convenience method for checking whether feature is enabled in given bitmask.

Parameters
flags:int

Bit field that contains a set of enabled features of this type

Returns:boolean

True if this feature is enabled in passed bit field

Annotations
@Override
featureIndexback to summary
public int featureIndex()

Implements com.fasterxml.jackson.databind.cfg.DatatypeFeature.featureIndex.

Doc from com.fasterxml.jackson.databind.cfg.DatatypeFeature.featureIndex.

Internal index used for efficient storage and index; no user serviceable contents inside!

Annotations
@Override
getMaskback to summary
public int getMask()

Implements com.fasterxml.jackson.core.util.JacksonFeature.getMask.

Doc from com.fasterxml.jackson.core.util.JacksonFeature.getMask.

Returns bit mask for this feature instance; must be a single bit, that is of form 1 << N.

Returns:int

Bit mask of this feature

Annotations
@Override
valueOfback to summary
public static JsonNodeFeature valueOf(String name)
valuesback to summary
public static JsonNodeFeature[] values()