Yaml Parser
Default ConfigParser implementation for YAML configuration files.
This parser uses SnakeYAML Engine to parse and serialize YAML configuration data. It supports deserialization into Kotlin data classes (using primary constructors) or Java records (with optional NamedRecord annotation for component name mapping).
It also automatically registers a YamlUpdateStrategy for handling configuration updates.
Typically passed to net.ririfa.yacla.loader.ConfigLoaderBuilder.parser when using Yacla with YAML.
Example:
val loader = Yacla.loader<MyConfig>()
.fromResource("/defaults/config.yml")
.toFile(Paths.get("config.yml"))
.parser(YamlParser())
.load()Content copied to clipboard
Functions
Link copied to clipboard
Parses YAML content from the given InputStream into a Map of key-value pairs.