import pathlib
import json


def load(path, **kw):
    """`json.load` which understands filenames.

    :param kw: Keyword parameters are passed to json.load
    :return: The python object read from path.
    """
    with pathlib.Path(path).open(encoding='utf-8') as fp:
        return json.load(fp, **kw)