-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
JSON is not greatest format for manually maintained files, YAML is a much better choice IMHO.
Taking from your samples, imagine that instead of:
{
"local": {
"dbtype":"mysql",
"database":"mysite",
"server":"localhost",
"logins":[
{
"username":"root",
"password":"",
"mode":"rw",
}
]
}
}
you could have
local:
dbtype: mysql
database: mysite
server: localhost
logins:
- root:
password: actual_password
mode: rw
that's it, no quotes to deal with as well. In case you would want to do it, snakeyaml is the best YAML lib for Java.
See how Dropwizard represents a very complex set of configurations easily with YAML:
http://www.dropwizard.io/manual/core/#configuration-defaults
Cheers
Jacek (PROS)
Metadata
Metadata
Assignees
Labels
No labels