Enum Class CBORReadFeature
- All Implemented Interfaces:
Serializable, Comparable<CBORReadFeature>, Constable, tools.jackson.core.FormatFeature, tools.jackson.core.util.JacksonFeature
NOTE: in Jackson 2.x this was named CBORParser.Feature.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFeature 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).Feature that determines how a CBOR "simple value" of major type 7 is exposed by parser.Feature that determines how anundefinedvalue (0xF7) is exposed by parser. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intMethod that calculates bit set (flags) of all features that are enabled by default.booleanbooleanenabledIn(int flags) intgetMask()static CBORReadFeatureReturns the enum constant of this class with the specified name.static CBORReadFeature[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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_ENCODINGfor encoding.The default value is
truein Jackson 3.x (wasfalsein Jackson 2.x). -
READ_UNDEFINED_AS_EMBEDDED_OBJECT
Feature that determines how anundefinedvalue (0xF7) is exposed by parser.When enabled, the parser returns
JsonToken.VALUE_EMBEDDED_OBJECTwith a value ofnull, allowing the caller to distinguishundefinedfrom actualJsonToken.VALUE_NULL. When disabled,undefinedvalue is reported as simpleJsonToken.VALUE_NULL.The default value is
truein Jackson 3.x (wasfalsein Jackson 2.x). -
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_OBJECTwith an embedded value of typeCBORSimpleValue, allowing the caller to distinguish these values from actualJsonToken.VALUE_NUMBER_INTs. When disabled, simple values are returned asJsonToken.VALUE_NUMBER_INTs.The default value is
truein Jackson 3.x (wasfalsein Jackson 2.x).
-
-
Field Details
-
_defaultState
private final boolean _defaultState -
_mask
private final int _mask
-
-
Constructor Details
-
CBORReadFeature
private CBORReadFeature(boolean defaultState)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
collectDefaults
public static int collectDefaults()Method that calculates bit set (flags) of all features that are enabled by default. -
enabledByDefault
public boolean enabledByDefault()- Specified by:
enabledByDefaultin interfacetools.jackson.core.util.JacksonFeature
-
enabledIn
public boolean enabledIn(int flags) - Specified by:
enabledInin interfacetools.jackson.core.util.JacksonFeature
-
getMask
public int getMask()- Specified by:
getMaskin interfacetools.jackson.core.util.JacksonFeature
-