rex.utilities.utilities.safe_json_load

safe_json_load(fpath)[source]

Perform a json file load with better exception handling.

Parameters:

fpath (str) – Filepath to .json file.

Returns:

dict – Loaded json dictionary.

Examples

>>> json_path = "./path_to_json.json"
>>> safe_json_load(json_path)
{key1: value1,
 key2: value2}