import json


def readconf(conffile):
    """
    read the configuration file, and return configuration elements in
    a dict.
    """

    try:
        with open(conffile,"r",encoding="utf-8") as conf_fp:
            conf=json.load(conf_fp)
    except OSError as j_error:
        print(f'Error: {j_error}')
        conf={}
    return conf