import json


def dict_to_binary(json_dict: dict) -> bytes:
    """
    Encode the json file to utf-8
    :param json_dict: dict
    :return: json
    """
    return json.dumps(json_dict).encode('utf-8')