为什么在使用$ .getJSON时出现错误“ SyntaxError:JSON中位置1139处的意外令牌”错误?

时间:2019-03-31 13:15:38

标签: jquery json

我收到消息

  

SyntaxError:JSON中位置1139处出现意外令牌

我通过jsonlint.com(有效JSON)验证了JSON文件。

当我想使用$.getJSON获取JSON文件时。

我在 Apache Tomcat / 9.0.0.M19 上的Java-Servlet(项目信息)中从MySQL-DB创建一些JSON。当我想使用$.getJSON$.Ajax获取项目信息时,在某些项目上会收到消息SyntaxError:JSON中位置1139处的意外令牌

我使用 jsonlint.com (有效JSON)验证了JSON文件。

此文件有什么问题?

$.ajax({
    dataType: "json",
    url: "/GetProjectIssues?projectid=" + projectID + "&lang=" + lang + "&counter=" + counter++,
    [
      {
        "id": 11,
        "projectmeeting_id": "5",
        "id_cust": "1",
        "entrydate": "",
        "component": "K1",
        "theme": "P1",
        "reason": "U1",
        "action": "M1",
        "responsible_cust": "bmw1",
        "priority": "3",
        "finaldate": "",
        "finaldate_180": "30.03.2019;3;23;0",
        "finaldate_100": "30.03.2019;3;24;0",
        "finaldate_220": "16.03.2019;4;25;0",
        "responsible_RS": ""
      },
      {
        "id": 12,
        "projectmeeting_id": "5",
        "id_cust": "2",
        "entrydate": "",
        "component": "K2",
        "theme": "P2",
        "reason": "U2",
        "action": "M2",
        "responsible_cust": "",
        "priority": "0",
        "finaldate": "31.03.2019",
        "finaldate_180": "31.03.2019;3;26;0",
        "finaldate_100": "15.03.2019;2;27;0",
        "finaldate_220": ";0;28;0",
        "responsible_RS": "Projektleiter"
      },
      {
        "id": 13,
        "projectmeeting_id": "6",
        "id_cust": "3",
        "entrydate": "",
        "component": "K3",
        "theme": "P3",
        "reason": "U3",
        "action": "M3",
        "responsible_cust": "",
        "priority": "1",
        "finaldate": "",
        "finaldate_180": "30.03.2019;3;29;0",
        "finaldate_100": "21.03.2019;4;31;0",
        "finaldate_220": "30.03.2019;3;32;0",
        "responsible_RS": ""
      },
      {
        "id": 14,
        "projectmeeting_id": "6",
        "id_cust": "",
        "entrydate": "",
        "component": "",
        "theme": "ghgfh",
        "reason": "gfhfg",
        "action": "jmnjvg jhkh",
        "responsible_cust": "",
        "priority": "0",
        "finaldate": "",
        "finaldate_180": ";0;33;0",
        "responsible_RS": ""
      },
      {
        "id": 15,
        "projectmeeting_id": "7",
        "id_cust": "",
        "entrydate": "",
        "component": "",
        "theme": "",
        "reason": "",
        "action": "",
        "responsible_cust": "",
        "priority": "0",
        "finaldate": "",
        "responsible_RS": ""
      },
      {
        "id": 16,
        "projectmeeting_id": "7",
        "id_cust": "",
        "entrydate": "",
        "component": "",
        "theme": "",
        "reason": "",
        "action": "",
        "responsible_cust": "",
        "priority": "2",
        "finaldate": "",
        "responsible_RS": ""
      },
      {
        "id": 17,
        "projectmeeting_id": "7",
        "id_cust": "",
        "entrydate": "",
        "component": "",
        "theme": "",
        "reason": "",
        "action": "",
        "responsible_cust": "",
        "priority": "0",
        "finaldate": "",
        "responsible_RS": ""
      },
      {
        "id": 18,
        "projectmeeting_id": "7",
        "id_cust": "",
        "entrydate": "",
        "component": "",
        "theme": "",
        "reason": "",
        "action": "",
        "responsible_cust": "",
        "priority": "0",
        "finaldate": "",
        "responsible_RS": ""
      },
      {
        "id": 19,
        "projectmeeting_id": "7",
        "id_cust": "",
        "entrydate": "",
        "component": "",
        "theme": "",
        "reason": "",
        "action": "",
        "responsible_cust": "",
        "priority": "0",
        "finaldate": "",
        "responsible_RS": ""
      },
      {
        "id": 20,
        "projectmeeting_id": "7",
        "id_cust": "",
        "entrydate": "",
        "component": "",
        "theme": "",
        "reason": "",
        "action": "",
        "responsible_cust": "",
        "priority": "0",
        "finaldate": "",
        "responsible_RS": ""
      },
      {
        "id": 21,
        "projectmeeting_id": "7",
        "id_cust": "",
        "entrydate": "",
        "component": "",
        "theme": "",
        "reason": "",
        "action": "",
        "responsible_cust": "",
        "priority": "0",
        "finaldate": "",
        "responsible_RS": ""
      },
      {
        "id": 22,
        "projectmeeting_id": "7",
        "id_cust": "",
        "entrydate": "",
        "component": "",
        "theme": "",
        "reason": "",
        "action": "",
        "responsible_cust": "",
        "priority": "0",
        "finaldate": "",
        "responsible_RS": ""
      },
      {
        "id": 23,
        "projectmeeting_id": "7",
        "id_cust": "",
        "entrydate": "29.03.2019",
        "component": "",
        "theme": "",
        "reason": "",
        "action": "",
        "responsible_cust": "",
        "priority": "0",
        "finaldate": "",
        "responsible_RS": ""
      }
    ]


0 个答案:

没有答案