0.20.0
What's changed
-
New:
YamlMap
now hasget(key)
andgetScalar(key)
methods that return the YAML node or scalar value (respectively) in the map forkey
(#32 - thanks to @Vampire for the suggestion) -
New: it is now possible to change the indentation level and maximum scalar value width when encoding values to YAML (#33 - thanks to @Vampire for the suggestion)
Set
encodingIndentationSize
orbreakScalarsAt
onYamlConfiguration
to alter the default values (indent by two spaces, and split scalars onto a new line at 80 characters). -
New: calling
toString()
on an exception now includes line and column numbers in the result, for example:com.charleskorn.kaml.YamlException at line 123, column 456: Something went wrong
(#36 - thanks to @Vampire for the suggestion) -
Changed:
⚠️ Potentially breaking change: Kotlin 1.4's explicit API mode has been enabled. Some internal APIs that were previously exposed are now correctly marked asinternal
.If you were relying on these previously public APIs, please file an issue explaining your use case.
Upgrading
If you're using Gradle, reference kaml in your dependencies
block like this:
implementation("com.charleskorn.kaml:kaml:0.20.0")
For other tools, refer to the Maven Central release page for more information.