TheElectronWill / night-config

Powerful java configuration library for toml, yaml, hocon, json and in-memory configurations. Serialization/deserialization framework.
GNU Lesser General Public License v3.0
242 stars 28 forks source link

Prettier toml serialization? #185

Open themg95 opened 1 month ago

themg95 commented 1 month ago

I've noticed that in older versions toml is serialized like this:

[category]
option1 = true
option2 = false

but now it's serialized like this:

category = {option1 = true, option2=false}

Is there an option to switch to the older formatting?

TheElectronWill commented 1 month ago

It depends on TomlWriter#writeTableInlinePredicate that you can set with TomlWriter#setWriteTableInlinePredicate. You can try this to see if it improves the result.

themg95 commented 1 month ago

I've tried setting the predicate to just false and to just true but none of them did anything