[
https://issues.apache.org/jira/browse/CB-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13289385#comment-13289385
]
Patrick Mueller edited comment on CB-773 at 6/5/12 1:06 PM:
------------------------------------------------------------
fixed in git commit:
https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-js.git;a=commit;h=29e353bf8b612139d4807e0ed9f3d3b83be08a74
Added try/catch wrappers around iOS's console's and the logger's usage of
JSON.stringify().
Added tests for logger; tested console in a Cordova app.
Drive by enhancement, added a grunt file which watches the source files and
runs grunt. Replacement for "wr" usage.
was (Author: pmuellr):
fixed in git commit:
https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-js.git;a=commit;h=29e353bf8b612139d4807e0ed9f3d3b83be08a74
> JSON.stringify error when making AJAX calls.
> --------------------------------------------
>
> Key: CB-773
> URL: https://issues.apache.org/jira/browse/CB-773
> Project: Apache Cordova
> Issue Type: Bug
> Components: iOS
> Affects Versions: 1.7.0
> Environment: Cordova 1.7.1
> Mac OSX 10.7
> iPhone simulator - iOS 5.1
> iPad 2 - iOS 5.1.1
> jQuery 1.7.1
> Reporter: Aaron
> Assignee: Patrick Mueller
> Labels: ajax, jquery
> Fix For: 1.8.0
>
>
> I'm attempting to load a JSON object via a $.ajax call and am getting a weird
> error. It works fine on the iPad and iPhone simulators (iOS 5.1), but when
> testing on a real device (iPad iOS 5.1.1) I receive the following error
> (courtesy of $(document).ajaxError).
> 2012-05-13 20:21:12.955 Modeling[555:707] [INFO] TypeError: JSON.stringify
> cannot serialize cyclic structures.
> The example json file I am loading can be found at:
> http://api.geonames.org/countryInfoJSON?formatted=true&lang=it&country=DE&username=demo&style=full
> There is no cycles or references, so the error received does not pertain to
> the source.
> Setup One (Successful):
> - iPhone Simulator - iOS 5.1
> - Cordova 1.7.0
> - jQuery 1.7.1 (& 1.7.2)
> Screenshot: http://i.imgur.com/MlFZ0.png
> The source was retrieved using $.ajax successfully (response "success").
> Setup One (Failure):
> - Physical iPad 2 - iOS 5.1.1
> - Cordova 1.7.0
> - jQuery 1.7.1 (& 1.7.2)
> Screenshot: http://i.imgur.com/e516V.png
> The url was NOT successfully processed. An error of "JSON.stringify cannot
> serialize cyclic structures." is given.
> Source code (example cordova index.html): https://gist.github.com/2698397
> As a side note, this was not an issue when using Cordova 1.5 or 1.6.1 (on iOS
> 5.1, NOT 5.1.1). If you need any further details please let me know.
> This is a cross post from a jQuery bug report, as I am not sure if this is a
> Cordova or jQuery issue.
> http://bugs.jquery.com/ticket/11762
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira