首页 > 移动平台 > 详细

IE8 MIME type application/json not found

时间:2014-03-20 18:15:24      阅读:349      评论:0      收藏:0      [点我收藏+]

如果:

public ContentResult GetPaper(string testId)
{
    return ControllProctector.Do1(() =>
        {
            var result = new UserPaperBll().GetTestPaper(testId, NativeHelper.LoginUser2.Id, NativeHelper.LoginUser2.OrganizationId);
            return new ContentResult
            {
                Content = new JavaScriptSerializer { MaxJsonLength = int.MaxValue }.Serialize(result),
                ContentType = "application/json"
            };
        });
}

我们会得到一些不正确的空值。需要去掉 ContentType = "application/json" 该行,然后前台将字符串转为 JSON 对象即可。

success: function (data) {
    data = JSON.parse(data);

IE8 MIME type application/json not found,布布扣,bubuko.com

IE8 MIME type application/json not found

原文:http://www.cnblogs.com/luminji/p/3614136.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!