私のブラウザ(chrome)は私のJSON(ASP.NETの戻り値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
}
}