Also note that from my experience, the X-JSON header is CASE SENSITIVE
-- and must all be lowercase.
~ Brice
John Wang wrote:
On 5/28/06, *Dirk Eschler* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
According to
http://www.sergiopereira.com/articles/prototype.js.html, the
second param is supposed to be the evaluated json object IF the
X-JSON header
is send in the response. I send the header in my script. However,
the json
var is always undefined and i have to evaluate t.responseText myself.
Am i missing anything important?
What version of prototype are you using? I think you need to be
running 1.4.0 or higher. I'm using 1.5.0 rc0 and auto-eval of X-JSON
works.
It'd be nice if the libraries could agree on how to accept the JSON
response since Dojo and other libraries seem to auto-eval
responseText. This is an issue if you have a generic server-side JSON
library since there doesn't seem to be a way to identify the library
being used (e.g. user agent).
John
------------------------------------------------------------------------
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs