import json


def load_json_data(json_data, encoding='utf-8'):
    """Load JSON contents from binary data.

    Parameters
    ----------
        json_data : bytes
            Binary data encoding JSON contents.

        encoding : str (optional, default 'utf-8')
            Encoding that was used.

    Returns
    -------
        contents : dict
            JSON contents.

    """
    return json.loads(json_data.decode(encoding))