Skip to content

0.24.0

Compare
Choose a tag to compare
@charleskorn charleskorn released this 03 Oct 04:49
0.24.0
79aae57

What's changed

  • New: all exceptions thrown during parsing now have the concept of a path, which shows the route taken to get to the location of the error. This makes it much easier to understand where an error is located, especially when merging or aliases are involved. (#37 - thanks to @Vampire for the issue report)

    For example, given the following input YAML:

    colours:
    - name: primary
      r: 100
      g: 200
      b: 203

    If the value primary is invalid for name, the exception would include the path colours[0].name.

    The path in included in toString() for all exceptions.

  • Improved: the error message shown when an object has multiple merges (<< keys) has been clarified.

  • Improved: YamlNode and subclasses now have a much clearer toString() output, which should make debugging custom deserializers much easier.

  • ⚠️ Breaking change: YamlMap now only allows scalars as keys. This should not impact most users as decoding a YAML map with non-scalar keys previously threw an exception anyway.

Upgrading

If you're using Gradle, reference kaml in your dependencies block like this:

implementation("com.charleskorn.kaml:kaml:0.24.0")

For other tools, refer to the Maven Central release page for more information.