def read_json_file()

in assets/scripts/SilentInstaller.py [0:0]


def read_json_file(file_path):
    ''' Reads a json file '''

    try:
        with open(file_path) as json_file:
            return json.loads(json_file.read())
    except IOError as ex:
        raise OptionsError('Could not open json file "%s"' % file_path)
    except ValueError as ex:
        raise OptionsError('The json file "%s" contains malformed json' % file_path)