Releases: charleskorn/kaml
0.54.0
-
New: add support for naming strategies, similar to the feature in kotlinx.serialization's JSON support (#400 - thanks to @russellbanks for the PR)
This makes it easy to use different field naming schemes such as snake_case, kebab-case, PascalCase, and camelCase without needing to modify the corresponding Kotlin property names or annotate properties with
@SerialName
. -
Updated: build with Kotlin 1.8.21
-
Changed: remove unnecessary stdlib dependency (#421 - thanks to @russellbanks for the PR)
0.53.0
-
Changed (
⚠️ potentially breaking change): default to not parsing anchors and aliases to prevent billion laughs attacks (GHSA-c24f-2j3g-rg48 - thanks to @gdude2002 for reporting this offline)If your application needs to support anchors and aliases, enable them by setting
YamlConfiguration.allowAnchorsAndAliases
totrue
.
0.52.0
- Updated: use Kotlin 1.8.10
- Updated: use kotlinx.serialization 1.5.0
0.51.0
- New: added
SingleLineStringStyle.PlainExceptAmbiguous
to automatically quote strings that may be interpreted as numeric or boolean values (#371 - thanks to @russellbanks for the PR)
0.50.0
0.49.0
- Updated: use snakeyaml-engine 2.5.
0.48.0
-
Updated: use snakeyaml-engine 2.4.
This improves support for some older versions of Android, amongst other improvements.
0.47.0
-
New: it is now possible to emit lists indented, rather than aligned with their parent (#317 - thanks to @Cloudate9 for the PR)
For example, previously, kaml would produce output like this:
list: - 1 - 2 - 3
With this change, if you set the newly added
sequenceBlockIndent
property onYamlConfiguration
to 2, the output would be: (notice the extra indentation for the list items)list: - 1 - 2 - 3
-
Updated: build against Kotlin 1.7.10.
0.46.0
- New: it is now possible to parse a string or stream to a
YamlNode
rather than decoding to a Kotlin object (#296 - thanks to @kitterion for the PR) - Updated: build against Kotlin 1.7.
0.45.0
-
New: it is now possible to serialise comments for object properties by applying a
YamlComment
annotation to the property (#287 - thanks to @slava110 for the PR)For example, serializing this class:
@Serializable data class Configuration( @YamlComment("The host to connect to") val hostname: String, @YamlComment("The port to connect to ") val port: Int )
will result in output like:
# The host to connect to hostname: my.server.com # The port to connect to port: 1234