Top Description Fields Constructors Methods
tools.jackson.dataformat.cbor

public final Enum CBORReadFeature

extends Enum<CBORReadFeature>
implements FormatFeature
Class Inheritance
All Implemented Interfaces
tools.jackson.core.FormatFeature, tools.jackson.core.util.JacksonFeature
Imports
tools.jackson.core.FormatFeature, .JsonToken

Enumeration that defines all togglable features for CBOR parser.

Note

in Jackson 2.x this was named CBORParser.Feature.

Field Summary

Modifier and TypeField and Description
private final boolean
private final int
public static final CBORReadFeature
DECODE_USING_STANDARD_NEGATIVE_BIGINT_ENCODING

Feature that determines how binary tagged negative BigInteger values are decoded: either assuming CBOR standard encoding logic (as per spec), or the legacy Jackson encoding logic (encoding up to Jackson 2.19).

public static final CBORReadFeature
READ_SIMPLE_VALUE_AS_EMBEDDED_OBJECT

Feature that determines how a CBOR "simple value" of major type 7 is exposed by parser.

public static final CBORReadFeature
READ_UNDEFINED_AS_EMBEDDED_OBJECT

Feature that determines how an undefined value (0xF7) is exposed by parser.

Constructor Summary

AccessConstructor and Description
private
CBORReadFeature(boolean defaultState)

Method Summary

Modifier and TypeMethod and Description
public static int
collectDefaults()

Method that calculates bit set (flags) of all features that are enabled by default.

public boolean
enabledByDefault()

Implements tools.jackson.core.util.JacksonFeature.enabledByDefault.

Accessor for checking whether this feature is enabled by default.

public boolean
enabledIn(int flags)

Implements tools.jackson.core.util.JacksonFeature.enabledIn.

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

public int
getMask()

Implements tools.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 CBORReadFeature
public static CBORReadFeature[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

_defaultStateback to summary
private final boolean _defaultState
_maskback to summary
private final int _mask
DECODE_USING_STANDARD_NEGATIVE_BIGINT_ENCODINGback to summary
public static final CBORReadFeature DECODE_USING_STANDARD_NEGATIVE_BIGINT_ENCODING

Feature that determines how binary tagged negative BigInteger values are decoded: either assuming CBOR standard encoding logic (as per spec), or the legacy Jackson encoding logic (encoding up to Jackson 2.19). When enabled, ensures proper encoding of negative values (e.g., [0xC3, 0x41, 0x00] is decoded as -1) When disabled, maintains compatible behavior to versions prior to 3.0. (e.g., [0xC3, 0x41, 0x00] is decoded as 0).

Note that there is the counterpart CBORWriteFeature#ENCODE_USING_STANDARD_NEGATIVE_BIGINT_ENCODING for encoding.

The default value is true in Jackson 3.x (was false in Jackson 2.x).

READ_SIMPLE_VALUE_AS_EMBEDDED_OBJECTback to summary
public static final CBORReadFeature READ_SIMPLE_VALUE_AS_EMBEDDED_OBJECT

Feature that determines how a CBOR "simple value" of major type 7 is exposed by parser.

When enabled, the parser returns JsonToken#VALUE_EMBEDDED_OBJECT with an embedded value of type CBORSimpleValue, allowing the caller to distinguish these values from actual JsonToken#VALUE_NUMBER_INTs. When disabled, simple values are returned as JsonToken#VALUE_NUMBER_INTs.

The default value is true in Jackson 3.x (was false in Jackson 2.x).

READ_UNDEFINED_AS_EMBEDDED_OBJECTback to summary
public static final CBORReadFeature READ_UNDEFINED_AS_EMBEDDED_OBJECT

Feature that determines how an undefined value (0xF7) is exposed by parser.

When enabled, the parser returns JsonToken#VALUE_EMBEDDED_OBJECT with a value of null, allowing the caller to distinguish undefined from actual JsonToken#VALUE_NULL. When disabled, undefined value is reported as simple JsonToken#VALUE_NULL.

The default value is true in Jackson 3.x (was false in Jackson 2.x).

Constructor Detail

CBORReadFeatureback to summary
private CBORReadFeature(boolean defaultState)

Method Detail

collectDefaultsback to summary
public static int collectDefaults()

Method that calculates bit set (flags) of all features that are enabled by default.

enabledByDefaultback to summary
public boolean enabledByDefault()

Implements tools.jackson.core.util.JacksonFeature.enabledByDefault.

Doc from tools.jackson.core.util.JacksonFeature.enabledByDefault.

Accessor for checking whether this feature is enabled by default.

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

Implements tools.jackson.core.util.JacksonFeature.enabledIn.

Doc from tools.jackson.core.util.JacksonFeature.enabledIn.

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

Annotations
@Override
getMaskback to summary
public int getMask()

Implements tools.jackson.core.util.JacksonFeature.getMask.

Doc from tools.jackson.core.util.JacksonFeature.getMask.

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

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