Hmmmmm... I don't think that will work.

The response does return JSON.  It returns JSON that looks like:

 
google.visualization.Query.setResponse({"status":"ok","reqId":"0","table":
{"cols ...

Are you saying I can pass this string to the method
google.visualization.Query.setResponse?  That seems a little odd,
since the response itself contains a call to
google.visualization.Query.setResponse().

I also didn't think this would work because of the reqID.  If you eval
the string directly, without wrapping it in another
google.visualization.Query.setResponse(), you get an error because
google.visualization.Query doesn't recognize the reqId (which makes
sense, since google.visualization.Query never sent the request in the
first place).  If I wrap it in a
google.visualization.Query.setResponse() call as you're suggesting, I
assume I'd get the same error.

I don't have a chance to test this now, though, so am just being
hypothetical, but I suspect it won't work.  Sorry to sound so
pessimistic :)







On Jan 17, 11:22 pm, NP <[email protected]> wrote:
> You might not need to do a regex. If
> google.visualization.Query.setResponse returns JSON, then you can just
> eval it directly.
> Something like
> response = google.visualization.Query.setResponse(...)
> response = eval(response);
> var data = new google.visualization.DataTable(response.table);
>
> On Jan 17, 11:12 am, NA <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > That's what I ended up doing.  With some minor tweaks to the regexp
> > expressions, it works well.  (If anyone wants to see, let me know and
> > I'll post it later tonight.  I'm not at the computer that has access
> > to that code right now).
>
> > thanks again for the helpful suggestion,

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to