Class SerdeYamlConfiguration
java.lang.Object
io.micronaut.serde.yaml.SerdeYamlConfiguration
@ConfigurationProperties("micronaut.serde.format.yaml")
public final class SerdeYamlConfiguration
extends Object
YAML-specific configuration, bound from the
micronaut.serde.format.yaml properties.- Since:
- 3.2.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classControls YAML deserialization behavior.static final classControls YAML serialization behavior.static enumYAML collection write style. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the maximum number of code points a single YAML input may contain.intReturns the configured indentation width.Returns the YAML read features.Returns the YAML write features.Returns the configured write style.booleanReturns whether simple YAML keys may be up to 1024 characters long.booleanReturns whether YAML boolean-like words should be parsed as strings.booleanReturns whether YAML should be emitted in canonical form.booleanReturns whether empty YAML strings should be parsed asnull.booleanReturns whether to emit an explicit document end marker.booleanReturns whether to emit an explicit document start marker.booleanReturns whether sequence indicators should be indented.booleanReturns whether sequence indicators should be indented by two spaces.booleanReturns whether multiline strings should be emitted using YAML literal block style.booleanReturns whether quotes should be omitted from strings when YAML permits it.booleanReturns whether long textual content should be split into multiple lines.booleanReturns whether non-finite numbers should use YAML notation.voidsetReadFeatures(SerdeYamlConfiguration.ReadFeatures readFeatures) Sets the YAML read features.voidsetWriteFeatures(SerdeYamlConfiguration.WriteFeatures writeFeatures) Sets the YAML write features.
-
Constructor Details
-
SerdeYamlConfiguration
public SerdeYamlConfiguration()
-
-
Method Details
-
getReadFeatures
Returns the YAML read features.- Returns:
- The YAML read features
-
setReadFeatures
Sets the YAML read features.- Parameters:
readFeatures- The YAML read features
-
getWriteFeatures
Returns the YAML write features.- Returns:
- The YAML write features
-
setWriteFeatures
Sets the YAML write features.- Parameters:
writeFeatures- The YAML write features
-
getWriteStyle
Returns the configured write style.- Returns:
- The configured write style
-
isExplicitStart
public boolean isExplicitStart()Returns whether to emit an explicit document start marker.- Returns:
- Whether to emit
---
-
isExplicitEnd
public boolean isExplicitEnd()Returns whether to emit an explicit document end marker.- Returns:
- Whether to emit
...
-
getIndent
public int getIndent()Returns the configured indentation width.- Returns:
- The indentation width
-
isMinimizeQuotes
public boolean isMinimizeQuotes()Returns whether quotes should be omitted from strings when YAML permits it.- Returns:
- Whether to minimize quotes
-
isLiteralBlockStyle
public boolean isLiteralBlockStyle()Returns whether multiline strings should be emitted using YAML literal block style.- Returns:
- Whether to use literal block style
-
isSplitLines
public boolean isSplitLines()Returns whether long textual content should be split into multiple lines.- Returns:
- Whether long lines should be split
-
isCanonicalOutput
public boolean isCanonicalOutput()Returns whether YAML should be emitted in canonical form.- Returns:
- Whether to use canonical output
- Since:
- 3.2.0
-
isIndentArrays
public boolean isIndentArrays()Returns whether sequence indicators should be indented.- Returns:
- Whether to indent arrays
- Since:
- 3.2.0
-
isIndentArraysWithIndicator
public boolean isIndentArraysWithIndicator()Returns whether sequence indicators should be indented by two spaces.- Returns:
- Whether to indent arrays with the indicator
- Since:
- 3.2.0
-
isAllowLongKeys
public boolean isAllowLongKeys()Returns whether simple YAML keys may be up to 1024 characters long.- Returns:
- Whether to allow long keys
- Since:
- 3.2.0
-
isUseYamlNonfiniteNotation
public boolean isUseYamlNonfiniteNotation()Returns whether non-finite numbers should use YAML notation.- Returns:
- Whether to use YAML notation for non-finite numbers
- Since:
- 3.2.0
-
isBooleanAsStrings
public boolean isBooleanAsStrings()Returns whether YAML boolean-like words should be parsed as strings.- Returns:
- Whether boolean-like words should be parsed as strings
-
isEmptyStringAsNull
public boolean isEmptyStringAsNull()Returns whether empty YAML strings should be parsed asnull.- Returns:
- Whether empty strings should be parsed as
null
-
getCodePointLimit
public int getCodePointLimit()Returns the maximum number of code points a single YAML input may contain.- Returns:
- The code point limit
-