Skip to main content

Bug Tracker

Side navigation

#14384 closed bug (duplicate)

Opened September 24, 2013 01:02PM UTC

Closed September 24, 2013 01:25PM UTC

Last modified September 24, 2013 01:26PM UTC

JQuery 1.10.2 is not working with IE10

Reported by: kushal.patel@einfochips.com Owned by:
Priority: undecided Milestone: None
Component: ajax Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:
Description

We are facing issue when we are parsing a json data.

Below is the function which throws error

parseJSON: function( data ) {

Attempt to parse using the native JSON parser first

if (window.JSON && window.JSON.parse) {

return window.JSON.parse( data ); We are getting error from this line due to data is undefined

}

if (data === null) {

return data;

}

if ( typeof data === "string" ) {

// Make sure leading/trailing whitespace is removed (IE can't handle it)

data = jQuery.trim( data );

if ( data ) {

Make sure the incoming data is actual JSON

Logic borrowed from http://json.org/json2.js

if ( rvalidchars.test( data.replace( rvalidescape, "@" )

.replace( rvalidtokens, "]" )

.replace( rvalidbraces, "")) ) {

return ( new Function( "return " + data ) )();

}

}

}

jQuery.error( "Invalid JSON: " + data );

}

Attachments (0)
Change History (2)

Changed September 24, 2013 01:25PM UTC by gibson042 comment:1

resolution: → duplicate
status: newclosed

Duplicate of #13169.undefined is not valid JSON and is expected to generate an exception.

Changed September 24, 2013 01:26PM UTC by gibson042 comment:2

component: unfiledajax