Powerful java configuration library for toml, yaml, hocon, json and in-memory configurations
More bug fixes :)
Full Changelog: https://github.com/TheElectronWill/night-config/compare/v3.6.6...v3.6.7
Fixes include: #101, #113
Fix #87, fix #82
See #77
See #71 :smiley:
This release resolves the issue #62 by adding two methods to FileConfigBuilder:
preserveInsertionOrder()
backingMapCreator(Supplier<Map<String, Object>>)
And some other things around the backing map of configurations.
If you implement your own ConfigFormat
, please note that the interface now requires you to implement the new method createConfig(Supplier<Map<String, Object>>)
.
The two methods createConfig()
and createConcurrentConfig()
are now default
methods and don't need to be implemented. They both call createConfig(Supplier)
with the result of Config.getDefaultMapCreator(boolean)
.
You can read the detailed changes here.
If you don't implement your own ConfigFormat then everything is fine! Just enjoy the new features. :smiley:
You can now use the following code to make all new configurations preserve the insertion order of their values.
Config.setInsertionOrderPreserved(true)
You can also provide your own map supplier ("map creator") on a case-by-case basis. See PR https://github.com/TheElectronWill/Night-Config/pull/61
Unlike wrapping a LinkedHashMap
, these two new possibilities also work with nested configs.
Fix writing of enum values for TOML and JSON languages.