import base64


def serializePemBytesForJson(pem: bytes) -> str:
    """Serializes the given PEM-encoded bytes for inclusion in a JSON request body."""
    return base64.b64encode(pem).decode('utf-8')