Note
in Jackson 2.x this was named YAMLGenerator.Feature.
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final int | |
| public static final YAMLWriteFeature | ALLOW_LONG_KEYS
Option passed to SnakeYAML to allows writing key longer that 128 characters (up to 1024 characters). |
| public static final YAMLWriteFeature | 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. |
| public static final YAMLWriteFeature | CANONICAL_OUTPUT
Do we try to force so-called canonical output or not. |
| public static final YAMLWriteFeature | INDENT_ARRAYS
Feature enabling of which adds indentation for array entry generation (default indentation being 2 spaces). |
| public static final YAMLWriteFeature | INDENT_ARRAYS_WITH_INDICATOR
Feature enabling of which adds indentation with indicator for array entry generation (default indentation being 2 spaces). |
| public static final YAMLWriteFeature | LITERAL_BLOCK_STYLE
Whether for string containing newlines a literal block style should be used. |
| public static final YAMLWriteFeature | MINIMIZE_QUOTES
Whether strings will be rendered without quotes (true) or with quotes (false, default). |
| public static final YAMLWriteFeature | SPLIT_LINES
Options passed to SnakeYAML that determines whether longer textual content gets automatically split into multiple lines or not. |
| public static final YAMLWriteFeature | USE_NATIVE_OBJECT_ID
Whether to use YAML native Object Id construct for indicating type (true); or "generic" Object Id mechanism (false). |
| public static final YAMLWriteFeature | USE_NATIVE_TYPE_ID
Whether to use YAML native Type Id construct for indicating type (true); or "generic" type property (false). |
| public static final YAMLWriteFeature | WRITE_DOC_START_MARKER
Whether we are to write an explicit document start marker ("---") or not. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method 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. Accessor for checking whether this feature is enabled by default. |
| public boolean | enabledIn(int flags)
Implements tools. Convenience method for checking whether feature is enabled in given bitmask. |
| public int | getMask()
Implements tools. Returns bit mask for this feature instance; must be a single bit,
that is of form |
| public static YAMLWriteFeature | |
| public static YAMLWriteFeature[] |
| _defaultState | back to summary |
|---|---|
| private final boolean _defaultState | |
| _mask | back to summary |
|---|---|
| private final int _mask | |
| ALLOW_LONG_KEYS | back to summary |
|---|---|
| public static final YAMLWriteFeature ALLOW_LONG_KEYS Option passed to SnakeYAML to allows writing key longer that 128 characters (up to 1024 characters). If disabled, the max key length is left as 128 characters: longer names are truncated. If enabled, limit is raised to 1024 characters.
Ignored if you provide your own | |
| ALWAYS_QUOTE_NUMBERS_AS_STRINGS | back to summary |
|---|---|
| public static final YAMLWriteFeature 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. Minimized quote usage makes for more human readable output; however, content is limited to printable characters according to the rules of literal block style. | |
| CANONICAL_OUTPUT | back to summary |
|---|---|
| public static final YAMLWriteFeature CANONICAL_OUTPUT Do we try to force so-called canonical output or not.
Ignored if you provide your own | |
| INDENT_ARRAYS | back to summary |
|---|---|
| public static final YAMLWriteFeature INDENT_ARRAYS Feature enabling of which adds indentation for array entry generation (default indentation being 2 spaces).
Default value is
Ignored if you provide your own | |
| INDENT_ARRAYS_WITH_INDICATOR | back to summary |
|---|---|
| public static final YAMLWriteFeature INDENT_ARRAYS_WITH_INDICATOR Feature enabling of which adds indentation with indicator for array entry generation (default indentation being 2 spaces).
Default value is
Ignored if you provide your own | |
| LITERAL_BLOCK_STYLE | back to summary |
|---|---|
| public static final YAMLWriteFeature LITERAL_BLOCK_STYLE Whether for string containing newlines a
literal block style
should be used. This automatically enabled when The content of such strings is limited to printable characters according to the rules of literal block style. | |
| MINIMIZE_QUOTES | back to summary |
|---|---|
| public static final YAMLWriteFeature MINIMIZE_QUOTES Whether strings will be rendered without quotes (true) or with quotes (false, default). Minimized quote usage makes for more human readable output; however, content is limited to printable characters according to the rules of literal block style. | |
| SPLIT_LINES | back to summary |
|---|---|
| public static final YAMLWriteFeature SPLIT_LINES Options passed to SnakeYAML that determines whether longer textual content gets automatically split into multiple lines or not. Feature is enabled by default to conform to SnakeYAML defaults.
Ignored if you provide your own | |
| USE_NATIVE_OBJECT_ID | back to summary |
|---|---|
| public static final YAMLWriteFeature USE_NATIVE_OBJECT_ID Whether to use YAML native Object Id construct for indicating type (true); or "generic" Object Id mechanism (false). Former works better for systems that are YAML-centric; latter may be better choice for interoperability, when converting between formats or accepting other formats. | |
| USE_NATIVE_TYPE_ID | back to summary |
|---|---|
| public static final YAMLWriteFeature USE_NATIVE_TYPE_ID Whether to use YAML native Type Id construct for indicating type (true); or "generic" type property (false). Former works better for systems that are YAML-centric; latter may be better choice for interoperability, when converting between formats or accepting other formats. | |
| WRITE_DOC_START_MARKER | back to summary |
|---|---|
| public static final YAMLWriteFeature WRITE_DOC_START_MARKER Whether we are to write an explicit document start marker ("---") or not. | |
| YAMLWriteFeature | back to summary |
|---|---|
| private YAMLWriteFeature(boolean defaultState) | |
| collectDefaults | back to summary |
|---|---|
| public static int collectDefaults() Method that calculates bit set (flags) of all features that are enabled by default. | |
| enabledByDefault | back to summary |
|---|---|
| public boolean enabledByDefault() Implements tools. Doc from tools. Accessor for checking whether this feature is enabled by default.
| |
| enabledIn | back to summary |
|---|---|
| public boolean enabledIn(int flags) Implements tools. Doc from tools. Convenience method for checking whether feature is enabled in given bitmask.
| |
| getMask | back to summary |
|---|---|
| public int getMask() Implements tools. Doc from tools. Returns bit mask for this feature instance; must be a single bit,
that is of form
| |
| valueOf | back to summary |
|---|---|
| public static YAMLWriteFeature valueOf(String name) | |
| values | back to summary |
|---|---|
| public static YAMLWriteFeature[] values() | |