pucauto icon indicating copy to clipboard operation
pucauto copied to clipboard

Add comments to config.example.json using commentjson library

Open tomreece opened this issue 9 years ago • 1 comments

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

tomreece avatar Dec 24 '15 19:12 tomreece

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

eengstrom avatar Dec 26 '15 15:12 eengstrom