citylearn.utilities module
- citylearn.utilities.read_json(filepath: str, **kwargs)[source]
Return json document as dictionary.
- Parameters
filepath (str) – pathname of JSON document.
**kwargs (dict) – Other infrequently used keyword arguments to be parsed to simplejson.load.
- Returns
JSON document converted to dictionary.
- Return type
dict
- citylearn.utilities.write_json(filepath: str, dictionary: dict, **kwargs)[source]
Write dictionary to json file. Returns boolen value of operation success.
- Parameters
filepath (str) – pathname of JSON document.
dictionary (dict) – dictionary to convert to JSON.
**kwargs (dict) – Other infrequently used keyword arguments to be parsed to simplejson.dump.