kaml v0.24.0 Release Notes

Release Date: 2020-10-03 // over 3 years ago
  • 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: primaryr: 100g: 200b: 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.