Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11103 closed bug (invalid)

parseJSON solved in chrome

Reported by: Sushovan Mukherjee <[email protected]…> Owned by: Sushovan Mukherjee <[email protected]…>
Priority: low Milestone: None
Component: misc Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:


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,

Change History (4)

comment:1 Changed 11 years ago by sindresorhus

Owner: set to Sushovan Mukherjee <[email protected]…>
Status: newpending

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.

comment:2 Changed 11 years ago by addyosmani

Component: unfiledmisc
Priority: undecidedlow

@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 trac-o-bot

Resolution: invalid
Status: pendingclosed

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 sushovan

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.

Note: See TracTickets for help on using tickets.