def strip_json_cruft(text: str) -> str:
    """Removes `for(;;);` (and other cruft) that preceeds JSON responses"""
    try:
        return text[text.index("{") :]
    except ValueError:
        raise ValueError("No JSON object found: {!r}".format(text))