night-config
night-config copied to clipboard
Powerful java configuration library for toml, yaml, hocon, json and in-memory configurations. Serialization/deserialization framework.
Closes #105, Closes #165 This PR introduces the `Cursor` interface that has methods to gather information about cursor information. If a `Cursor` is passed to a `ParsingException`, the exception message...
``` Caused by: com.electronwill.nightconfig.core.io.ParsingException: Invalid bare key: ] at com.electronwill.nightconfig.toml.TableParser.parseKey(TableParser.java:175) ~[toml-3.6.4.jar%2393!/:?] at com.electronwill.nightconfig.toml.TableParser.parseDottedKey(TableParser.java:145) ~[toml-3.6.4.jar%2393!/:?] at com.electronwill.nightconfig.toml.TableParser.parseNormal(TableParser.java:55) ~[toml-3.6.4.jar%2393!/:?] at com.electronwill.nightconfig.toml.TomlParser.parse(TomlParser.java:44) ~[toml-3.6.4.jar%2393!/:?] at com.electronwill.nightconfig.toml.TomlParser.parse(TomlParser.java:37) ~[toml-3.6.4.jar%2393!/:?] at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:113) ~[core-3.6.4.jar%2392!/:?] at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:219) ~[core-3.6.4.jar%2392!/:?] at...
A few annotations are missing from the new serde package. In particular, there's no "Spec" annotation that apply a condition before finalizing the serialization of fields. This feature should be...
It seems that the automatic casts confuse/surprise some people (cf. NeoForge server). What do you guys think? Should we keep `config.get` or require an explicit type, such as `config.getXYZ` or...
This is an attempt to fix #183 by retrying the atomic move operation after some delay, if it fails with `AccessDeniedException`. ## Testing Could someone on Windows (with Windows Defender)...
On Windows, we sometimes run into AccessDeniedExceptions when saving a config rapidly likely due to WindowsDefender locking the config file, preventing it from being replaced. ```java new TomlWriter().write(config, file, WritingMode.REPLACE_ATOMIC);...
The `serde` pack in `3.8.0` is really convenient to use, however the current exception handling method is too strict. Imagine the scenes below: 1. **I don't want to write `@SerdeDefault`s...
I've noticed that in older versions toml is serialized like this: ```toml [category] option1 = true option2 = false ``` but now it's serialized like this: ```toml category = {option1...