import json


def load_json_file(filename):
    """Read a JSON file and return the data as a dict. 
    Return None on failure.
    """

    try:
        with open(filename, "r") as file:
            data = json.load(file)
        return data
    except Exception as e:
        print(e)
        return None