Skip to content
This repository was archived by the owner on Nov 30, 2025. It is now read-only.

0.8.0

Pre-release
Pre-release

Choose a tag to compare

@charleskorn charleskorn released this 09 Mar 21:20

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 tasks
    
    tasks:
      build-app:
        group: *build
        command: build.sh app
    
      build-lib:
        group: *build
        command: build.sh lib
    
      test-app:
        group: *test
        command: test.sh app
    
      test-lib:
        group: *test
        command: test.sh lib

    Specify the extension prefix (such as x- or .) by setting extensionDefinitionPrefix when creating an instance of Yaml.

    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.