LoadSettingsBuilder

Builder pattern implementation for LoadSettings

Functions

Link copied to clipboard

Build immutable LoadSettings

Link copied to clipboard

YAML 1.2 does require unique keys. To support the backwards compatibility it is possible to select what should happend when non-unique keys are detected.

Link copied to clipboard

Allow only non-recursive keys for maps and sets. By default, is it not allowed. Even though YAML allows to use anything as a key, it may cause unexpected issues when loading recursive structures.

Link copied to clipboard

Buffer size for incoming data stream. If the incoming stream is already buffered, then changing the buffer does not improve the performance

Link copied to clipboard

The max amount of code points for every input YAML document in the stream. Please be aware that byte limit depends on the encoding.

Link copied to clipboard

Provide a custom property to be used later

Link copied to clipboard

Provide default List implementation. ArrayList is used if nothing provided.

Link copied to clipboard

Provide default Map implementation. LinkedHashMap is used if nothing provided.

Link copied to clipboard

Provide default Set implementation. LinkedHashSet is used if nothing provided.

Link copied to clipboard

Define EnvConfig to parse EVN format. If not set explicitly the variable substitution is not applied

Link copied to clipboard

Label for the input data. Can be used to improve the error message.

Link copied to clipboard
fun setMaxAliasesForCollections(maxAliasesForCollections: Int): LoadSettingsBuilder

Restrict the number of aliases for collection nodes to prevent 'billion laughs attack'. The purpose of this setting is to force SnakeYAML to fail before a lot of CPU and memory resources are allocated for the parser. Aliases for scalar nodes do not count because they do not grow exponentially.

Link copied to clipboard

Parse comments to the presentation tree (Node). False by default

Link copied to clipboard

Provide constructors for the specified tags.

Link copied to clipboard

Marks are only used for error messages, but they require a lot of memory. true by default.

Link copied to clipboard

Manage YAML directive value which defines the version of the YAML specification. This parser supports YAML 1.2, but it can parse most of YAML 1.1 and YAML 1.0