-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
Long .properties files are hard to read. This is noticeable even in seqmotif, where key nesting is not obvious.
Priority: minor.
Solution
YAML 1.2 is a good option. (1.1 is actually, really, truly horrific.)
yaml.org lists snakeyaml-engine as its recommended YAML 1.2 parser for Java. That project is maintained.
Changes
The changes are very easy to implement.
- Let
ConfigManager.readdelegate toConfigManager.readYamlorConfigManager.readPropertiesper the filename suffix. - Split keys on
.to define superkey–subkey relationships (left-associative).
Both changes are technically breaking but very unlikely to cause real-world problems.
.propertiesfiles should use that suffix anyway.- In some projects,
.is used to join words. Listingjob.to.run = xdefinesjobandjob.to. Although that leads to semantically invalid keys, there will be no effect unlessjoborjob.tois also defined. Prefer-to join words instead.
Alternatives
TOML is great, but Java parsers for it are poorly maintained, and there's little reason to support both YAML and TOML.
Metadata
Metadata
Assignees
Labels
No labels