0.24.0
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 forname
, the exception would include the pathcolours[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 clearertoString()
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.