import json


def read_json_file(filename):
    """Read JSON file

        Read JSON file as dictionary

        Args:
            filename(str): Filename

        Returns:
            dict: Dictionary with file content
    """
    with open(filename, 'r') as json_file:
        json_str = json_file.read()

        try:
            parsed_json = json.loads(json_str)
        except json.JSONDecodeError as err:
            raise Exception(f"Could not read: {filename}; "
                            f"Error: {err}") from err

    return parsed_json