使用JSON.parse()解析数组时出错

时间:2013-08-29 15:15:03

标签: javascript jquery json

当我试图在地图上显示标记时,我收到了这个奇怪的错误。而且因为这张地图没有呈现。传递其他数据时一切正常。除了这些数据。 请帮忙

[
    ["Guiseley", "Unit 1", "Guiseley Retail Park", "Guiseley", "Leeds", "LS20 8QH", "01943878882", "5.6 miles", "england/guiseley/", "53.871101", "-1.7091662"],
    ["Batley - The Mill", "Unit HG2", "The Mill Discount Dept Store", "Bradford Road", "Batley", "WF17 5LZ", "01924 441066", "7.9 miles", "england/batley/", "53.7127707", "-1.6256998"],
    ["Ilkley", "6 Brook Street", " ", "Ilkley", "West Yorkshire", "LS29 8DA", "01943 605206", "9.3 miles", "england/ilkley/", "53.9248540", "-1.8229255"],
    ["Skipton", "29 High Street", " ", "Skipton", "North Yorkshire", "BD23 1DT", "01756 700043", "15.5 miles", " ", ","53.9619226"," - 2.0160739 "],
    ["Castleford - Junction 32 ","Unit A1 / 2 ","nction 32 Outlet Centre ","Carrwood Road ","Glasshowton ","WF10 4FR ","01977 514333 ","18.2 miles ","england / castleford / ","53.7120297 "," - 1.3394888 "]
  ] 

enter image description here

1 个答案:

答案 0 :(得分:4)

通过JSON Lint运行它,您会看到错误:

Parse error on line 51:
...    " ",        ","53.9619226","-2.0160
----------------------^
Expecting '}', ':', ',', ']'