from typing import Union
from typing import List
from typing import Dict
import json


def load_json(filename: str) -> Union[List, Dict]:
    """Load JSON data from a file and return as dict or list.

    Defaults to returning empty dict if file is not found.
    """
    with open(filename, encoding="utf-8") as fdesc:
        return json.loads(fdesc.read())
    return {}