IE8中的JSON语法错误
JSON syntax error in IE8?
我有一个网站,否则在大多数浏览器中运行良好,我开始有错误在IE8说JSON是未定义的。网络告诉我下载json2.js,一切都会好的。
现在给出这个错误:
"语法错误"第204行字符7"
第204行:
var data = JSON.parse(jqXHR.responseText);
我试过了:
1. <!DOCTYPE html>
2. <meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
3. <script src="http://cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.min.js"></script>
我验证的JSON是有效的JSON,我没有想法。接下来我应该去哪里找?
编辑2:
如果我只是暂时发布链接会更容易:http://pilot032013.herokuapp.com/address/51376f833ef9eb361f354ebc/
编辑1:
function getUncuratedBuildingSuccess(jqXHR, textStatus) {
//console.log(jqXHR.responseText);
var data = JSON.parse(jqXHR.responseText);
CURRENT_BUILDING_ID = data.id;
//Load Images
generateImageUrls(data.id);
//Some point soon, I want to have a building object reflect the database
building_footprint = fixBrokenFootprint(data.points);
var building = new google.maps.Polygon({
path: building_footprint,
strokeColor: "#6f298b",
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: "#ad2390",
fillOpacity: 0.35
});
extendBounds(building);
building_location = new google.maps.LatLng(data.center[1], data.center[0]);
building.setMap(map);
displayAddress(data.dte_addresses);
displayGSVImage(data.dte_addresses);
displayParcel(data.parcel_id);
displayStatus(replaceAmbig(data.override));
//displayPastVotes(data.id);
}
jqXHR.responseText:
中保存的JSON{"suffix": "", "owner_mail_state": "None", "parcel_id": "4562354", "street_name": "", "owner_mail_zipcode": "None", "living_area": "None", "imaging_runs": ["20130307_004341_4"], "owner": "None", "num_floors": null, "id": "51424ad73ee3eb75fc5deae1", "city": "Boston", "owner_mail_address": "None", "energy_score_raw": "24.5240226853", "structural_class": "None", "zipcode": "49525", "state": "MI", "override": "None", "assessor_lot": "None", "street_num": "", "owner_mail_city": "None", "geocoded_address": [], "unit_num": "None", "use_description": "None", "vertical_panoramas": [["20130307_004341_4_r_1482539_mts", "20130307_004341_4_r_1482524_mts", "20130307_004341_4_r_1482555_mts", "20130307_004341_4_r_1482570_mts"]], "building_style": "None", "assessor_map": "None", "exterior_material": "None", "fireplace": "None", "roof_type": "None", "use_code": "None", "year_built": "None", "center": [-85.6279876548728, 43.028673273958084], "energy_score_city": 69, "year_remodeled": "None", "air_conditioner": "None", "created_at": "2013-06-11T15:20:12.301190", "heat_type": "None", "owner_occupied": "None", "contract": "dte", "energy_score_neighbors": 79, "points": [[-85.6279345148065, 43.0287278589084], [-85.62793027273129, 43.0286178277214], [-85.6280408213034, 43.0286193662203], [-85.6280455189338, 43.0287278763051], [-85.6279345148065, 43.0287278589084]], "num_units": "None", "yme_addresses": [{"_changed_fields": [], "site_id": "3390379", "_initialised": true, "_created": false, "_data": {"city": "Boston", "suffix": "ROAD NE", "state": "MA", "street_name": "4 MILE", "is_contracted": null, "zipcode": "49525", "prefix": null, "street_num": "1665"}, "ser_seq": "1"}], "_id": "None", "gross_area": "None"}
如果一个
的url <script src="...url..."></script>
不返回javascript
在你的链接中找到脚本注释
GET http://cdnjs.cloudflare.com/ajax/libs/json3/3.2.5/json3.min.js 404 (Not Found) pilot032013.herokuapp.com:31
再次检查你的JavaScript CDN,确保它正常工作
相关文章:
- 错误:语法错误,无法识别的表达式:不支持的伪:无效/RectJS/Unit Testing
- 未捕获错误:语法错误,无法识别的表达式:input[@type=submit]
- jQuery AJAX Post方法错误(语法错误)
- 如何“;修复解析错误:语法错误,意外'{'in”用于php
- 错误:错误:语法错误,无法识别的表达式:
- 未捕获错误:语法错误,无法识别的表达式:ajaxsample/update_agenda(CodeIgniter)
- 未捕获错误:语法错误,无法识别表达式Jquery选择器单引号与双引号
- Javascript ( jQuery ) 错误: 语法错误: 缺少 ) 在参数列表之后
- 错误:语法错误:令牌“”,“”是意外的标记
- 未捕获的错误:语法错误,无法识别的表达式:输入:复选框[名称=ninja_forms_field_57[术语]]
- 未捕获的错误:语法错误,无法识别的表达式:“.b-brand-box”
- 未捕获的错误:语法错误,无法识别的表达式:href
- ReactJS 返回解析器错误语法错误:在 AJAX 调用 JAVA servlet 后出现意外的标记 a
- jQuery:未捕获错误:语法错误,无法识别的表达式
- j查询错误 - 语法错误:缺少:在属性 ID 之后
- 在使用 Gulp 在 javascript 中声明对象时,在 Git bash 中出现以下错误“语法错误:意外标识符”
- 获取未捕获错误:语法错误、无法识别的表达式
- 获取错误语法错误:属性列表 url 后缺少 }:http://localhost/mcportal/public/pos
- 为什么我收到错误“语法错误:非法字符”
- 未捕获错误:语法错误,无法识别的表达式