import json


def parse_json(filename):
    """Parse a parameter file in JSON format

    Parameters
    ----------
    filename : str
        File name including the path for json file
    
    Returns
    -------
    data : dict
        Parameters returned as a dictionary
    """
    with open(filename) as f:
        try:
            data = json.load(f, )
        except Exception:
            raise

    return data