public static enum CBORParser.Feature extends Enum<CBORParser.Feature> implements com.fasterxml.jackson.core.FormatFeature
| Enum Constant and Description |
|---|
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).
|
READ_SIMPLE_VALUE_AS_EMBEDDED_OBJECT
Feature that determines how a CBOR "simple value" of major type 7 is exposed by parser.
|
READ_UNDEFINED_AS_EMBEDDED_OBJECT
Feature that determines how an
undefined value (0xF7) is exposed
by parser. |
| Modifier and Type | Method and Description |
|---|---|
static int |
collectDefaults()
Method that calculates bit set (flags) of all features that
are enabled by default.
|
boolean |
enabledByDefault() |
boolean |
enabledIn(int flags) |
int |
getMask() |
static CBORParser.Feature |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CBORParser.Feature[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CBORParser.Feature DECODE_USING_STANDARD_NEGATIVE_BIGINT_ENCODING
[0xC3, 0x41, 0x00] is decoded as -1)
When disabled, maintains backwards compatibility with existing implementations
(e.g., [0xC3, 0x41, 0x00] is decoded as 0).
Note that there is the counterpart
CBORGenerator.Feature.ENCODE_USING_STANDARD_NEGATIVE_BIGINT_ENCODING
for encoding.
The default value is false for backwards compatibility.
public static final CBORParser.Feature READ_UNDEFINED_AS_EMBEDDED_OBJECT
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 JsonToken.VALUE_NULL.
The default value is false for backwards compatibility (with versions prior to 2.20).
public static final CBORParser.Feature READ_SIMPLE_VALUE_AS_EMBEDDED_OBJECT
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_INT.
The default value is false for backwards compatibility (with versions prior to 2.20).
public static CBORParser.Feature[] values()
for (CBORParser.Feature c : CBORParser.Feature.values()) System.out.println(c);
public static CBORParser.Feature 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 static int collectDefaults()
public boolean enabledByDefault()
enabledByDefault in interface com.fasterxml.jackson.core.FormatFeatureenabledByDefault in interface com.fasterxml.jackson.core.util.JacksonFeaturepublic int getMask()
getMask in interface com.fasterxml.jackson.core.FormatFeaturegetMask in interface com.fasterxml.jackson.core.util.JacksonFeaturepublic boolean enabledIn(int flags)
enabledIn in interface com.fasterxml.jackson.core.FormatFeatureenabledIn in interface com.fasterxml.jackson.core.util.JacksonFeatureCopyright © 2026 FasterXML. All rights reserved.