import json


def get_json_bytes_for_sign_data(sign_data):
    """
    Convert SignData object to JSON bytes for signing.

    Args:
        sign_data (SignData): The sign data object.

    Returns:
        bytes: The sign data in JSON bytes.

    """
    return json.dumps(sign_data._asdict(),
                      sort_keys=True,
                      separators=(',', ':')).encode()