import json


def read_file(filename):
    """Read a JSON file.
    
    Args:
        filename (str): Name of the file.
    
    Returns:
        dict: A dictionary.
    
    Examples:
        >>> data = read_file('share/data.json')
        >>> type(data)
        <class 'dict'>
        >>> sorted(data.items(), key=lambda t: t[0])
        [('1', 2), ('3', '4'), ('name', 'Luke'), ('surname', 'Skywalker')]

    """
    with open(filename) as json_file:
        data = json.load(json_file)
    return data