Skip to content

Consider supporting YAML besides JSON #3

@jacek99

Description

@jacek99

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions