def _is_json(q):
    """Check if q is JSON.

    Parameters
    ----------
    q : str
        Query string.

    Returns
    -------
    bool
        True if q starts with "{" and ends with "}".

    """
    return q.strip().startswith("{") and q.strip().endswith("}")