def json_escape(text: str) ->str:
    """Escape double quotes for JSON.parse compatibility.

    Args:
        text: The text to sanitize.
    Returns:
        Escaped text.
    """
    return text.replace('"', '\\"')
