json Uncaught SyntaxError: Unexpected token , (comma)

json Uncaught SyntaxError: Unexpected token , (comma)

首先,我知道有很多类似的问题,其中非法字符是“:”或“<”,但我找不到非法字符是逗号的问题:

Uncaught SyntaxError: Unexpected token ,

我摆弄了 jQuery ajax 设置,大约 50% 的请求出现上述错误。奇怪的是有些工作有些不工作,对吧?

这是我的 JS:

            var url = "http://" + domain + "/NewsRoomContentsSvc.svc/getNewsRoomData/" + newsRoomId + "/" + skip + "/" + take + "/" + logged;

        var request = $.ajax({
            type: "GET",
            url: url,
            contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
            crossDomain: true,
            dataType: "jsonp",
            //jsonp:"callback",
            //jsonpCallback:"doNewsRoom",
            newsRoomId: newsRoomId,
            newsroom: newsroom,
            newsRoomParentId:newsRoomParentId,
            cache: false 
        });

        request.done(function (data, textStatus, jqXHR) {

            if (data)
            {
                var CarouselContainer = $("<ul style='width:55000px;'></ul>");
                buildNewsRoom(newsroom, CarouselContainer, data, newsRoomRows, newsRoomCols, newsRoomId, isFull, false);

            }
            else
            {
                //showErrorMsg("hmmmm, no data...");
            }
        })

        request.fail(function (jqXHR, textStatus, errorThrown) {
            if(jqXHR.responseText!=="") 
                showErrorMsg(jqXHR);
           // return false;
        })

我的 return JSONP 在我看来不错:

http://ec2-54-76-106-247.eu-west-1.compute.amazonaws.com/NewsRoomContentsSvc.svc/getNewsRoomData/24306184/0/10/1?callback=jQuery1102014052710216492414_1431942943848&_=1431942943849

一半的时间它命中 request.fail 方法并出现错误 "jQuery1102014052710216492414_1431942943848 was not called"

如有任何建议,我们将不胜感激

json无效:

   jQuery1102014052710216492414_1431942943848({"NewsRoomArticles":[{"ArticleId":26539256,"FeedId":, ....}

属性 "Comments":"Discussions""FeedId": 需要一个值更改您的数据库结构以包含默认值