Skip to main content

Bug Tracker

Side navigation

#11103 closed bug (invalid)

Opened December 24, 2011 09:33PM UTC

Closed January 10, 2012 07:56AM UTC

Last modified January 10, 2012 08:10AM UTC

parseJSON solved in chrome

Reported by: Sushovan Mukherjee <mukherjee.sushovan@gmail.com> Owned by: Sushovan Mukherjee <mukherjee.sushovan@gmail.com>
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/

Attachments (0)
Change History (4)

Changed December 25, 2011 10:45PM UTC by sindresorhus comment:1

owner: → Sushovan Mukherjee <mukherjee.sushovan@gmail.com>
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.

Changed December 26, 2011 01:37PM UTC by addyosmani comment:2

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.

Changed January 10, 2012 07:56AM UTC by trac-o-bot comment:3

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!

Changed January 10, 2012 08:10AM UTC by sushovan comment:4

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.