JQuery getJSON - ajax parseerror

后端 未结 17 1868
南笙
南笙 2020-12-01 13:04

I\'ve tried to parse the following json response with both the JQuery getJSON and ajax:

[{\"iId\":\"1\",\"heading\":\"Management Services\",\"body\":\"

17条回答
  •  攒了一身酷
    2020-12-01 13:30

    also try this

    $.ajax({
        url: url,
        data:datas,
        success:function(datas, textStatus, jqXHR){
        var returnedData = jQuery.parseJSON(datas.substr(datas.indexOf('{')));
    })};
    

    in my case server responds with unknow character before '{'

提交回复
热议问题