kaml v0.8.0 Release Notes
Release Date: 2019-03-09 // about 5 years ago-
What's changed
๐ New : kaml now supports aliases and anchors
๐ New : kaml now supports merging aliases into a map
๐ New : kaml now supports Docker Compose-style extensions
This allows users to define values used in multiple places once, and reference them throughout their document, for example:
.build: &build Build tasks.test: &test Test taskstasks: build-app: group: \*buildcommand: build.sh appbuild-lib: group: \*buildcommand: build.sh libtest-app: group: \*testcommand: test.sh apptest-lib: group: \*testcommand: test.sh lib
Specify the extension prefix (such as
x-
or.
) by settingextensionDefinitionPrefix
when creating an instance ofYaml
.Extensions can only be defined at the top level of a document, and only if the top level element is a map or object. Any key starting with the extension prefix must have an anchor defined and will not be included in the deserialised value.
โฌ๏ธ Upgrading
If you're using Gradle, reference kaml in your
dependencies
block like this:implementation("com.charleskorn.kaml:kaml:0.8.0")
๐ For other tools, refer to the Maven Central release page for more information.