Skip to content

0.2.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@charleskorn charleskorn released this 23 Dec 23:18

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(), cast input to YamlInput and call getCurrentLocation().

  • 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 be Unexpected 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.