Yet Another Config Loading API — Yacla loads YAML or JSON documents into Kotlin classes using their primary constructors. This documentation covers 4.2.0, matching the current source version.
What Yacla handles
Section titled “What Yacla handles”- Copies bundled defaults when the target file is missing.
- Maps keys, nested objects, collections, enums, and Kotlin default values.
- Validates fields through annotations and reports conversion errors with field paths.
- Merges newer default documents while retaining user values.
- Selects localized default resources using the JVM language or an explicit language.
Choose an entry point
Section titled “Choose an entry point”| API | Use it for |
|---|---|
Yacla.yaml<T>() / Yacla.json<T>() | Loading a config object directly |
yamlLoader<T>() / jsonLoader<T>() | Keeping a loader for manual updates and reloads |
Yacla.loader<T>() | Selecting parsers, update strategies, and language settings |
Yacla.withDefaults(...) | Sharing defaults between several loaders |
Documentation map
Section titled “Documentation map”Start with Getting Started, then explore mapping and validation, config updates, and localized defaults.
Java 17 or newer is required. Config objects currently need Kotlin primary constructors; Java applications can use the Java-friendly builder with Kotlin-defined config classes. Java records are not currently supported.
Yacla is distributed under the MIT license.