Package tools.jackson.dataformat.yaml
Enum Class YAMLReadFeature
- All Implemented Interfaces:
Serializable,Comparable<YAMLReadFeature>,Constable,tools.jackson.core.FormatFeature,tools.jackson.core.util.JacksonFeature
public enum YAMLReadFeature
extends Enum<YAMLReadFeature>
implements tools.jackson.core.FormatFeature
Enumeration that defines all togglable features for YAML parsers.
NOTE: in Jackson 2.x this was named YAMLParser.Feature.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFeature that determines whether empty YAML documents (documents with only comments or whitespace, or completely empty) should be exposed as empty Object (START_OBJECT/END_OBJECTtoken pair) instead of causing "No content to map" error.Feature that determines whether an emptyStringwill be parsed asnull. -
Method Summary
Modifier and TypeMethodDescriptionstatic intbooleanbooleanenabledIn(int flags) intgetMask()static YAMLReadFeatureReturns the enum constant of this class with the specified name.static YAMLReadFeature[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EMPTY_DOCUMENT_AS_EMPTY_OBJECT
Feature that determines whether empty YAML documents (documents with only comments or whitespace, or completely empty) should be exposed as empty Object (START_OBJECT/END_OBJECTtoken pair) instead of causing "No content to map" error.This is useful for example for deserializing to POJOs with default values, where an empty configuration file should create an object with all default values rather than failing.
Feature is disabled by default for backwards-compatibility.
-
EMPTY_STRING_AS_NULL
Feature that determines whether an emptyStringwill be parsed asnull. Logic is part of YAML 1.1 Null Language-Independent Type.Feature is enabled by default for backwards-compatibility reasons.
-
-
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() -
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
-