Class SerdeYamlConfiguration.WriteFeatures
java.lang.Object
io.micronaut.serde.yaml.SerdeYamlConfiguration.WriteFeatures
- Enclosing class:
SerdeYamlConfiguration
@ConfigurationProperties("write-features")
public static final class SerdeYamlConfiguration.WriteFeatures
extends Object
Controls YAML serialization behavior.
- Since:
- 3.2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the configured indentation width.Returns the configured write style.booleanReturns whether simple YAML keys may be up to 1024 characters long.booleanReturns whether YAML should be emitted in canonical form.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.voidsetAllowLongKeys(boolean allowLongKeys) Sets whether simple YAML keys may be up to 1024 characters long.voidsetCanonicalOutput(boolean canonicalOutput) Sets whether YAML should be emitted in canonical form.voidsetExplicitEnd(boolean explicitEnd) Sets whether to emit an explicit document end marker.voidsetExplicitStart(boolean explicitStart) Sets whether to emit an explicit document start marker.voidsetIndent(int indent) Sets the indentation width.voidsetIndentArrays(boolean indentArrays) Sets whether sequence indicators should be indented.voidsetIndentArraysWithIndicator(boolean indentArraysWithIndicator) Sets whether sequence indicators should be indented by two spaces.voidsetLiteralBlockStyle(boolean literalBlockStyle) Sets whether multiline strings should be emitted using YAML literal block style.voidsetMinimizeQuotes(boolean minimizeQuotes) Sets whether quotes should be omitted from strings when YAML permits it.voidsetSplitLines(boolean splitLines) Sets whether long textual content should be split into multiple lines.voidsetUseYamlNonfiniteNotation(boolean useYamlNonfiniteNotation) Sets whether non-finite numbers should use YAML notation.voidsetWriteStyle(SerdeYamlConfiguration.WriteStyle writeStyle) Sets the write style.
-
Constructor Details
-
WriteFeatures
public WriteFeatures()
-
-
Method Details
-
getWriteStyle
Returns the configured write style.- Returns:
- The configured write style
-
setWriteStyle
Sets the write style.- Parameters:
writeStyle- The write style
-
getIndent
public int getIndent()Returns the configured indentation width.- Returns:
- The indentation width
-
setIndent
public void setIndent(int indent) Sets the indentation width.- Parameters:
indent- The indentation width
-
isExplicitStart
public boolean isExplicitStart()Returns whether to emit an explicit document start marker.- Returns:
- Whether to emit
---
-
setExplicitStart
public void setExplicitStart(boolean explicitStart) Sets whether to emit an explicit document start marker.- Parameters:
explicitStart- Whether to emit---
-
isExplicitEnd
public boolean isExplicitEnd()Returns whether to emit an explicit document end marker.- Returns:
- Whether to emit
...
-
setExplicitEnd
public void setExplicitEnd(boolean explicitEnd) Sets whether to emit an explicit document end marker.- Parameters:
explicitEnd- Whether to emit...
-
isMinimizeQuotes
public boolean isMinimizeQuotes()Returns whether quotes should be omitted from strings when YAML permits it.- Returns:
- Whether to minimize quotes
-
setMinimizeQuotes
public void setMinimizeQuotes(boolean minimizeQuotes) Sets whether quotes should be omitted from strings when YAML permits it.- Parameters:
minimizeQuotes- 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
-
setLiteralBlockStyle
public void setLiteralBlockStyle(boolean literalBlockStyle) Sets whether multiline strings should be emitted using YAML literal block style.- Parameters:
literalBlockStyle- 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
-
setSplitLines
public void setSplitLines(boolean splitLines) Sets whether long textual content should be split into multiple lines.- Parameters:
splitLines- 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
-
setCanonicalOutput
public void setCanonicalOutput(boolean canonicalOutput) Sets whether YAML should be emitted in canonical form.- Parameters:
canonicalOutput- 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
-
setIndentArrays
public void setIndentArrays(boolean indentArrays) Sets whether sequence indicators should be indented.- Parameters:
indentArrays- 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
-
setIndentArraysWithIndicator
public void setIndentArraysWithIndicator(boolean indentArraysWithIndicator) Sets whether sequence indicators should be indented by two spaces.- Parameters:
indentArraysWithIndicator- 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
-
setAllowLongKeys
public void setAllowLongKeys(boolean allowLongKeys) Sets whether simple YAML keys may be up to 1024 characters long.- Parameters:
allowLongKeys- 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
-
setUseYamlNonfiniteNotation
public void setUseYamlNonfiniteNotation(boolean useYamlNonfiniteNotation) Sets whether non-finite numbers should use YAML notation.- Parameters:
useYamlNonfiniteNotation- Whether to use YAML notation for non-finite numbers- Since:
- 3.2.0
-