public static enum YAMLGenerator.Feature extends Enum<YAMLGenerator.Feature> implements com.fasterxml.jackson.core.FormatFeature
Enum Constant and Description |
---|
ALLOW_LONG_KEYS
Option passed to SnakeYAML to allows writing key longer that 128 characters
(up to 1024 characters).
|
ALWAYS_QUOTE_NUMBERS_AS_STRINGS
Whether numbers stored as strings will be rendered with quotes (true) or
without quotes (false, default) when MINIMIZE_QUOTES is enabled.
|
CANONICAL_OUTPUT
Do we try to force so-called canonical output or not.
|
INDENT_ARRAYS
Feature enabling of which adds indentation for array entry generation
(default indentation being 2 spaces).
|
INDENT_ARRAYS_WITH_INDICATOR
Feature enabling of which adds indentation with indicator for array entry generation
(default indentation being 2 spaces).
|
LITERAL_BLOCK_STYLE
Whether for string containing newlines a
literal block style
should be used.
|
MINIMIZE_QUOTES
Whether strings will be rendered without quotes (true) or
with quotes (false, default).
|
SPLIT_LINES
Options passed to SnakeYAML that determines whether longer textual content
gets automatically split into multiple lines or not.
|
USE_NATIVE_OBJECT_ID
Whether to use YAML native Object Id construct for indicating type (true);
or "generic" Object Id mechanism (false).
|
USE_NATIVE_TYPE_ID
Whether to use YAML native Type Id construct for indicating type (true);
or "generic" type property (false).
|
USE_PLATFORM_LINE_BREAKS
Option passed to SnakeYAML that determines if the line breaks used for
serialization should be same as what the default is for current platform.
|
WRITE_DOC_START_MARKER
Whether we are to write an explicit document start marker ("---")
or not.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
_defaultState |
protected int |
_mask |
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 YAMLGenerator.Feature |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static YAMLGenerator.Feature[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final YAMLGenerator.Feature WRITE_DOC_START_MARKER
public static final YAMLGenerator.Feature USE_NATIVE_OBJECT_ID
public static final YAMLGenerator.Feature USE_NATIVE_TYPE_ID
public static final YAMLGenerator.Feature CANONICAL_OUTPUT
Ignored if you provide your own DumperOptions
.
public static final YAMLGenerator.Feature SPLIT_LINES
Feature is enabled by default to conform to SnakeYAML defaults as well as backwards compatibility with 2.5 and earlier versions.
Ignored if you provide your own DumperOptions
.
public static final YAMLGenerator.Feature MINIMIZE_QUOTES
Minimized quote usage makes for more human readable output; however, content is limited to printable characters according to the rules of literal block style.
public static final YAMLGenerator.Feature ALWAYS_QUOTE_NUMBERS_AS_STRINGS
Minimized quote usage makes for more human readable output; however, content is limited to printable characters according to the rules of literal block style.
public static final YAMLGenerator.Feature LITERAL_BLOCK_STYLE
MINIMIZE_QUOTES
is set.
The content of such strings is limited to printable characters according to the rules of literal block style.
public static final YAMLGenerator.Feature INDENT_ARRAYS
Default value is false
for backwards compatibility
Ignored if you provide your own DumperOptions
.
public static final YAMLGenerator.Feature INDENT_ARRAYS_WITH_INDICATOR
Default value is false
for backwards compatibility
Ignored if you provide your own DumperOptions
.
public static final YAMLGenerator.Feature USE_PLATFORM_LINE_BREAKS
\n
) will be used.
Default value is false
for backwards compatibility
Ignored if you provide your own DumperOptions
.
public static final YAMLGenerator.Feature ALLOW_LONG_KEYS
Default value is false
for backwards-compatibility (same as behavior
before this feature was added).
Ignored if you provide your own DumperOptions
.
public static YAMLGenerator.Feature[] values()
for (YAMLGenerator.Feature c : YAMLGenerator.Feature.values()) System.out.println(c);
public static YAMLGenerator.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.FormatFeature
enabledByDefault
in interface com.fasterxml.jackson.core.util.JacksonFeature
public boolean enabledIn(int flags)
enabledIn
in interface com.fasterxml.jackson.core.FormatFeature
enabledIn
in interface com.fasterxml.jackson.core.util.JacksonFeature
public int getMask()
getMask
in interface com.fasterxml.jackson.core.FormatFeature
getMask
in interface com.fasterxml.jackson.core.util.JacksonFeature
Copyright © 2022 FasterXML. All rights reserved.