from typing import Union
from pathlib import Path
from typing import Any
import json


def load(*, from_: Union[str, Path]) -> dict[str, Any]:
    """Loads JSON data from a file.

    :param from_: a path to a file to load data from.

    :returns: loaded JSON data.
    """

    with open(from_, 'r') as file:
        return json.load(file)