Releases: charleskorn/kaml
0.6.0
What's changed
- Updated: kaml is now compiled against Kotlin 1.3.20.
- Changed:
YamlInput
is now publicly accessible, to allow custom serializers to access location information during deserialization, which is useful to include in error messages. This is a reversion of the change in 0.5.0.
Upgrading
If you're using Gradle, reference kaml in your dependencies
block like this:
implementation("com.charleskorn.kaml:kaml:0.6.0")
For other tools, refer to the Maven Central release page for more information.
0.5.0
What's changed
- New: kaml now supports serializing Kotlin objects to YAML. Call
Yaml.default.serialize(serializer, input)
to convertinput
to YAML usingserializer
.
Upgrading
If you're using Gradle, reference kaml in your dependencies
block like this:
implementation("com.charleskorn.kaml:kaml:0.5.0")
For other tools, refer to the Maven Central release page for more information.
0.4.0
What's changed
-
New: kaml now supports providing custom serializers at runtime. See the kotlinx.serialization docs for more information.
⚠️ Breaking change: in order to support this, theYaml
object is no longer an object and is instead a class. To get the defaultYaml
instance, useYaml.default
instead.
Upgrading
If you're using Gradle, reference kaml in your dependencies
block like this:
implementation("com.charleskorn.kaml:kaml:0.4.0")
For other tools, refer to the Maven Central release page for more information.
0.3.0
What's changed
-
Changed:
YAML
has been renamed toYaml
, in line with the recent kotlinx.serialization release (whereJSON
was renamed toJson
). -
Improved: kaml now uses snakeyaml-engine instead of dahgan internally to parse YAML. This means:
- Error messages are significantly better - they are clearer and include context information of where something has gone wrong
- Performance is significantly better - loading times no longer grow exponentially as the document increases in size
Upgrading
If you're using Gradle, reference kaml in your dependencies
block like this:
implementation("com.charleskorn.kaml:kaml:0.3.0")
For other tools, refer to the Maven Central release page for more information.
0.2.1
What's changed
This release is identical to 0.2.0 but was re-released due to an issue deploying the artifacts to Maven Central.
Upgrading
If you're using Gradle, reference kaml in your dependencies
block like this:
implementation("com.charleskorn.kaml:kaml:0.2.1")
For other tools, refer to the Maven Central release page for more information.
0.2.0
What's changed
-
New: when the value for a field in a map or object is invalid, the key will now be included in the error message. For example:
Value for 'quantity' is invalid: Value 'abc' is not a valid integer value.
-
New: it's now possible for custom deserializers to access the location information of the current token, allowing them to include line and column numbers when reporting errors. In
deserialize()
, castinput
toYamlInput
and callgetCurrentLocation()
. -
Improved: specific exception types will now be thrown for common cases, making it easier to handle different issues. For example, an unknown object property will now throw a
UnknownPropertyException
. The full list of exceptions is available in the source. -
Improved: the message for the exception thrown when attempting to deserialize a null value into a non-null field is now far clearer. It was previously
class com.charleskorn.kaml.YamlNullInput can't retrieve untyped values
, now it will beUnexpected null or empty value for non-null field.
Upgrading
Due to an issue uploading the artifacts to Maven Central, this release isn't available for use. Use version 0.2.1 instead, which is identical.
0.1.0
Initial release.
This is a very rough initial version:
- Currently, only parsing YAML is supported. Emitting YAML will be added in a future version.
- Many operations are not yet optimised for performance.
- Only the JVM is supported, Kotlin/Native support will be added in a future version.
If you're using Gradle, reference it in your dependencies
block like this:
implementation("com.charleskorn.kaml:kaml:0.1.0")
For other tools, refer to the Maven Central release page for more information.