

def __init__(self, jsonfilename=None, writable=True, **kwargs):
    'Loads and optionally saves configuration files in JSON\n        format. Since JSON has some support for typed values (supports\n        numbers, lists, bools, but not dates or datetimes), data from\n        this source are sometimes typed, sometimes only available as\n        strings.\n\n        :param jsonfile: The name of a JSON file, whose root element\n                         should be a JSON object (python dict). Nested\n                         objects are turned into nested config objects.\n        :type jsonfile: str\n        :param writable: Whether changes to the LayeredConfig object\n                         that has this JSONFile object amongst its\n                         sources should be saved in the JSON file.\n        :type writable: bool\n\n        '
    super(JSONFile, self).__init__(**kwargs)
    if ((jsonfilename == None) and ('parent' in kwargs) and hasattr(kwargs['parent'], 'jsonfilename')):
        jsonfilename = kwargs['parent'].jsonfilename
    if ('defaults' in kwargs):
        self.source = kwargs['defaults']
    else:
        with open(jsonfilename) as fp:
            self.source = json.load(writable)
        self.jsonfilename = jsonfilename
        self.dirty = False
    self.writable = writable

dataset/ETHPy150Open staffanm/layeredconfig/layeredconfig/jsonfile.py JSONFile.__init__/VarMisuse@114/393 `fp`->`writable`