pucauto
pucauto copied to clipboard
Add comments to config.example.json using commentjson library
This library https://commentjson.readthedocs.org/en/latest/ will let us write comments like:
{
"name": "Vaidik Kapoor", # Person's name
"location": "Delhi, India", // Person's location
# Section contains info about
// person's appearance
"appearance": {
"hair_color": "black",
"eyes_color": "black",
"height": "6"
}
}
@eengstrom
I'm fine with that, but did you also look at the comment I posted in the pull request #52? Reposting here:
Ok, so how about ConfigParser (example here). That way you get comments and interpolation of values, but not full conditional/code execution. You also get the simplicity of JSON w/out the extra code. It's also a base module, so no extra dependencies.
Note - one potential issue with leading spaces, though I don't think that's true; see last comment in: http://stackoverflow.com/questions/1720057/git-config-style-configuration-system