LoaderSettings
Loader settings cover all options related explicitly (only) to file loading.
Creating a builder
Settings introduced by BoostedYAML follow builder design pattern, e.g. you may build your own settings using:
Basic settings
Create file if absent
Sets if to create a new file and save it if it does not exist automatically.
Not effective if there is no file associated with the document.
Default: true
(enabled)
Update automatically
If enabled, automatically calls YamlFile#update()
after the document has been loaded.
Not effective if there are no defaults associated with the document.
Default: false
(disabled)
Advanced settings
Error labels
Sets custom label for error messages.
Default: defined by the parent method Parent method docs (v2.3): click Related YAML spec (v1.2.2): -
Detailed errors
Sets if to print detailed error messages.
Default: true
Parent method docs (v2.3): click
Related YAML spec (v1.2.2): -
Allow duplicate keys
Sets if to allow duplicate keys in sections (last key wins when loading).
Default: true
Parent method docs (v2.3): click
Related YAML spec (v1.2.2): -
Max collection aliases
Sets maximum aliases a collection can have to prevent memory leaks (see Billion laughs attack).
Default: defined by the parent method Parent method docs (v2.3): click Related YAML spec (v1.2.2): -
Tag constructors
Sets custom node to Java object constructors, per YAML tag.
Default: defined by the parent method Parent method docs (v2.3): click Related YAML spec (v1.2.2): JSON schema tags, failsafe schema tags
Schema
Sets custom schema to use. Schemas are used to resolve and determine object tags contained within a document. This setting replaces setScalarResolver
available until the 1.3.6 release.
Default: defined by the parent method Parent method docs (v2.7): click Related YAML spec (v1.2.2): JSON schema tags, failsafe schema tags
Environment config
Sets custom environment variable config.
Default: defined by the parent method Parent method docs (v2.3): click Related YAML spec (v1.2.2): -
Last updated