1.2.0-M2: Hocon Support, Better Yaml Comments, Bugs Fixed From M1
Pre-release
Pre-release
With this release comes hocon support and more comment handling options with yaml. It also includes several bug-fixes for sub-section collections, a feature which should be stabilized by this release.
Additions:
- Hocon format support via HoconConfigurationFactory. Use the artifact
dazzleconf-ext-hocon
. - Better comment support for SnakeYaml. There are now 3 comment modes you can use:
- CommentMode.headerOnly - existing default behavior. Only writes the comment header.
- CommentMode.alternativeWriter - existing optional behavior formerly provided by
useCommentingWriter(true)
. This used to be the only way to write comments with snakeyaml. - CommentMode.fullComments - the most interesting. It uses SnakeYaml 1.28's new capability of writing comments. If you want to use this mode, you need to use SnakeYaml 1.28 or later.
Fixes:
- Sets and Collections of sub-sections are now permitted properly.
- Fixed SnakeYamlConfigurationFactory when using the alternate writer and a list of sub-sections. Resulted in
IllegalArgumentException: Unknown single value type class java.util.LinkedHashMap
- Restored behavioral compatibility with 1.1.x when auxiliary values are used and an entry is missing
Migration from 1.2.0-M1:
SnakeYamlOptions#commentFormat
has been removed. Use the #commentMode method instead.SnakeYamlOptions#useCommentingWriter
has been deprecated. Use#commentMode
withCommentMode.alternateWriter
instead.- An example for both migrations:
SnakeYamlOptions yamlOptions = new SnakeYamlOptions.Builder().commentMode(CommentMode.alternativeWriter(" # %s")).build();
As always, releases are available on Maven Central. This is a milestone release.