import json


def read_json_from_file(filename: str, encoding: str = 'utf-8') -> dict:
    """Load json configuration file.
    :param filename:
        Path to file.
    :param encoding:
        Encoding in which the file is read.
    :return:
        Loaded configuration as a dict.
    """
    if not filename:
        raise ValueError('Filename must be provided.')

    config = None
    with open(filename, encoding=encoding) as file:
        config = json.load(file)
    return config