我的浏览器(chrome)似乎不喜欢我的 JSON(通过 ASP.NET 的 return Json(object) 格式化)。
我失败的 JavaScript 处理程序如下所示:
var responseObj = JSON.parse(msg);
在我解析它之前,我可以看到 chrome JavaScript 调试器中的所有内容,但是当我将它发送到 JSON.parse() 时它失败了。
真正奇怪的是 JSONLint 说它是有效的。
我的 JSON 看起来像这样(实际对象要长得多,信不信由你):
{
"crct": {
"ETL_ID": 221,
"DELETE_FLAG": "N",
"ID": "a0Wc00000008sZGEAY",
"ISDELETED": "false",
"NAMEX": "CRCT-4474",
"CREATEDDATE": "/Date(1345769442000)/",
"CREATEDBYID": "005C00000049nuYIAQ",
"LASTMODIFIEDDATE": "/Date(1345771729000)/",
"LASTMODIFIEDBYID": "005C00000049nuYIAQ",
"SYSTEMMODSTAMP": "/Date(1345771729000)/",
"CLIENT_TASK": "a0Xc0000001lLihEAE",
"COUNTRY": null,
"PRA_CRCT_ID": null,
"PROJECT_REGION": "a0mc00000008ZPgAAM",
"TOTAL_UNITS_FRM": 200,
"UNIT_SCOPE_CHANGE": null,
"UNIT_SCOPE_DIFFERENCE": 0,
"CUMULATIVE_OFFICIAL_FORECAST_U": 200,
"CUMULATIVE_PENDING_DOWNSCOPE_U": 0,
"CUMULATIVE_BASELINE_UNITS_ROLL": 200,
"CUMULATIVE_WORKED_HOURS_ROLLUP": 0,
"CUMULATIVE_WORKED_UNITS_ROLLUP": 0,
"CLIENT_UNIT_NUMBER": null,
"EntityState": 2,
"EntityKey": {
"EntitySetName": "SF_CLIENT_REGION_COUNTRY_TASK",
"EntityContainerName": "SFEntities",
"EntityKeyValues": [
{
"Key": "ETL_ID",
"Value": 221
}
],
"IsTemporary": false
}
},
"unitChecks": {
"gaps": false,
"duplicates": false,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(1370059200000)/",
"liDurations": [
{
"thisTypeFound": true,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(-62135578800000)/",
"type": "Baseline",
"gaps": false,
"duplicates": false
},
{
"thisTypeFound": true,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(-62135578800000)/",
"type": "Official Forecast",
"gaps": false,
"duplicates": false
},
{
"thisTypeFound": true,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(-62135578800000)/",
"type": "Previous Official Forecast",
"gaps": false,
"duplicates": false
},
{
"thisTypeFound": true,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(-62135578800000)/",
"type": "Historical",
"gaps": false,
"duplicates": false
}
],
"numberOfUniqueBufCodes": 0
},
"effortChecks": {
"gaps": false,
"duplicates": false,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(1370059200000)/",
"liDurations": [
{
"thisTypeFound": true,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(-62135578800000)/",
"type": "Baseline",
"gaps": false,
"duplicates": false
},
{
"thisTypeFound": true,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(-62135578800000)/",
"type": "Official Forecast",
"gaps": false,
"duplicates": false
},
{
"thisTypeFound": true,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(-62135578800000)/",
"type": "Previous Official Forecast",
"gaps": false,
"duplicates": false
},
{
"thisTypeFound": true,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(-62135578800000)/",
"type": "Historical",
"gaps": false,
"duplicates": false
}
],
"numberOfUniqueBufCodes": 0
},
"hourChecks": {
"gaps": false,
"duplicates": false,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(1370059200000)/",
"liDurations": [
{
"thisTypeFound": true,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(-62135578800000)/",
"type": "Baseline",
"gaps": false,
"duplicates": false
},
{
"thisTypeFound": true,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(-62135578800000)/",
"type": "Official Forecast",
"gaps": false,
"duplicates": false
},
{
"thisTypeFound": true,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(-62135578800000)/",
"type": "Previous Official Forecast",
"gaps": false,
"duplicates": false
},
{
"thisTypeFound": true,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(-62135578800000)/",
"type": "Historical",
"gaps": false,
"duplicates": false
}
],
"numberOfUniqueBufCodes": 0
},
"effortRatioChecks": {
"gaps": false,
"duplicates": false,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(1370059200000)/",
"liDurations": [
{
"thisTypeFound": true,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(-62135578800000)/",
"type": "Baseline",
"gaps": false,
"duplicates": false
},
{
"thisTypeFound": true,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(-62135578800000)/",
"type": "Official Forecast",
"gaps": false,
"duplicates": false
},
{
"thisTypeFound": true,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(-62135578800000)/",
"type": "Previous Official Forecast",
"gaps": false,
"duplicates": false
},
{
"thisTypeFound": true,
"startDate": "/Date(1343793600000)/",
"endDate": "/Date(-62135578800000)/",
"type": "Historical",
"gaps": false,
"duplicates": false
}
],
"numberOfUniqueBufCodes": 0
}
}