Other articles


  1. Parse a JSON file with comments

    I like to use JSON files with python. It's very simple to read and use such files. For example:

    JSON file

    {
        "username": "John Smith",
        "age": 42,
        "list": ["a", "b", "c"]
    }
    

    Python script

    import json
    
    with open('file.json') as f:
        d = json.load(f)
        print d['username']
        print d ...
    read more

    Comment(s)

  2. Page 1 / 1