[英]Jquery 1.10.2 not working in IE10 - JSON
I'm facing issue when parsing a json data. 解析json数据时遇到问题。 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" ) {
data = jQuery.trim( data );
if ( data ) {
if ( rvalidchars.test( data.replace( rvalidescape, "@" )
.replace( rvalidtokens, "]" )
.replace( rvalidbraces, "")) ) {
return ( new Function( "return " + data ) )();
}
}
}
jQuery.error( "Invalid JSON: " + data );
}
Thanks in Advance 提前致谢
Your JSON data might be wrong. 您的JSON数据可能有误。 See
看到
http://jsonformatter.curiousconcept.com/
to validate it. 验证它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.