-
29 Dec 2011 8:17 AM #1
Android 2.3.3. JSON bug (JSON string twice in responseText)
Android 2.3.3. JSON bug (JSON string twice in responseText)
Hi all,
we bumped in a very strange bug on Android 2.3.3.
All ajax calls that expect a JSON object fail with "Unable to parse the JSON returned by the server.." due to a doubled JSON string. So instead of
the reponseText containsCode:{"key":"value"}
On Android 2.1 and Android 3.1 this problem does not occur.Code:{"key":"value"}{"key":"value"}
Can anybody confirm this behavior?
Best Regards
Sebastian
-
29 Dec 2011 8:57 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,599
- Vote Rating
- 434
The response has the double object? If so then that is not valid JSON and therefor not consumable.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
29 Dec 2011 9:34 AM #3
Yes, correct. The bug occurs due to an OPTION request sent in chrome browsers. We fixed this by
and responding only to POST and GET on ther server.Code:Ext.Ajax.useDefaultXhrHeader = false;


Reply With Quote