import json


def dict_to_json_bytes(content):
    """
    Converts a dict into JSON and encodes it to bytes.

    :param content:
    :type content: dict[any, any]

    :return: The JSON bytes.
    :rtype: bytes
    """
    return json.dumps(content).encode("UTF-8")