from typing import Dict
import json


def get_config_from_file(filename: str) -> Dict:
    """Return the content of a JSON config file as a dictionary."""
    with open(filename, "r", encoding="utf-8") as file:
        config = json.load(file)
    if not isinstance(config, dict):
        raise RuntimeError(
            f'Config file content must be an object, got "{type(config).__name__}" instead.'
        )
    return config