Class SerdeToonConfiguration
java.lang.Object
io.micronaut.serde.toon.SerdeToonConfiguration
@ConfigurationProperties("micronaut.serde.format.toon")
public final class SerdeToonConfiguration
extends Object
TOON-specific configuration.
- Since:
- 3.3.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe delimiter used to separate values within a TOON document, as defined by the specification. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longThemaximum input sizevalue meaning no limit. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the configured delimiter used to separate inline array values, tabular row cells, and keyed entry-row cells.intReturns the configured number of spaces used per indentation level.longReturns the maximum number of bytes of TOON input that is read when decoding.voidsetDelimiter(SerdeToonConfiguration.Delimiter delimiter) Sets the delimiter used to separate inline array values, tabular row cells, and keyed entry-row cells.voidsetIndent(int indent) Sets the number of spaces used per indentation level.voidsetMaxInputSize(long maxInputSize) Sets the maximum number of bytes of TOON input that is read when decoding.
-
Field Details
-
UNLIMITED
-
-
Constructor Details
-
SerdeToonConfiguration
public SerdeToonConfiguration()
-
-
Method Details
-
getDelimiter
Returns the configured delimiter used to separate inline array values, tabular row cells, and keyed entry-row cells.- Returns:
- The configured delimiter
-
setDelimiter
Sets the delimiter used to separate inline array values, tabular row cells, and keyed entry-row cells.- Parameters:
delimiter- The delimiter
-
getIndent
public int getIndent()Returns the configured number of spaces used per indentation level.- Returns:
- The indent size
-
setIndent
public void setIndent(int indent) Sets the number of spaces used per indentation level.- Parameters:
indent- The indent size
-
getMaxInputSize
public long getMaxInputSize()Returns the maximum number of bytes of TOON input that is read when decoding.- Returns:
- The maximum input size in bytes, or
UNLIMITED(the default)
-
setMaxInputSize
public void setMaxInputSize(long maxInputSize) Sets the maximum number of bytes of TOON input that is read when decoding. Input larger than this is rejected with aSerdeException.- Parameters:
maxInputSize- The maximum input size in bytes, orUNLIMITED
-