JQuery getJSON - ajax parseerror

后端 未结 17 1908
南笙
南笙 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:23

    Pleas note that in the question there is a syntax error. The line with

    x.overrideMimeType("application/j-son;charset=UTF-8");
    

    should read

    x.overrideMimeType("application/json; charset=UTF-8");
    

    This makes a big difference too.

提交回复
热议问题