#11103 closed bug (invalid)
parseJSON solved in chrome
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | misc | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In Google Chrome, parseJON was not working for "parseerror". I have solved this.
Please add this
$.ajaxSetup({converters:{"text json":function(t){return $.parseJSON(t.substr(t.indexOf('{')));}}});
--
Thanks and Regards,
Sushovan Mukherjee,
http://www.scienceanddevelops.com/
Change History (4)
comment:1 Changed 11 years ago by
Owner: | set to Sushovan Mukherjee <[email protected]…> |
---|---|
Status: | new → pending |
comment:2 Changed 11 years ago by
Component: | unfiled → misc |
---|---|
Priority: | undecided → low |
@Sushovan To expand on the above, could you let us know in your test case how "parseerror" was previously failing for you? I'm curious to see how parseJSON wasn't working as expected.
comment:3 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
comment:4 Changed 11 years ago by
Hi I don't know how to track the bugs, that's why I can not answer, sorry for this. In my case some unicode characters are in the front of the ajax response. And could not parse the json string. That's why I had to remove those characters first. In chrome that was the problem.
Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.
Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.