나는 C#에서 JSON을 역 직렬화하는 방법을 게시하지만 내 질문은 :C# : asp.net 3.5 : JSON - JSON 문자열 또는 객체를 비 직렬화 하시겠습니까?
내가이 JSON 문자열을 가지고 :
data = @"[{""ShiftID"":""2"",""EmpName"":""dsdsfs""},{""ShiftID"":""4"",""EmpName"":""dsdsfd""}]";
을 그리고 난이 유형을받은 경우 내 코드는하지만 완벽하게 잘 직렬화 할 수 있습니다 ""이없는의 때문에
data = @"[{
"Q6Option": null,
"Q5Comments": "",
"EndDate": "01/17/2012 12:57",
"Q4Comments": "",
"Active": 1,
"Q3Comments": "",
"Q8Option": null,
"Q2Comments": "",
"StartDate": "01/17/2012 12:57",
"Q3Option": null,
"Q5Option": null,
"Q1Comments": "",
"Q2Option": null,
"Station": "B1",
"Q7Option": null,
"SyncDate": null,
"ID": 1,
"Q8Comments": "",
"Q4Option": null,
"ShiftID": 1,
"EmpName": "CSM FName",
"Q1Option": null,
"Q7Comments": "",
"SyncStatus": 0,
"Q6Comments": "",
"EmpID": "111",
"createdAt": "2012-01-17T20:58:17.956Z",
"updatedAt": "2012-01-17T20:58:17.956Z",
"objectId": "XERFM5KrGv"
}]"
그것은 .. 당신이, 감사 아이디어가 잘 경우
을 작업을 나던!
무엇이 문제입니까? –
역 직렬화/직렬화에 어떤 도구를 사용합니까? – Mathieu
문제는 'StartDate'/EndDate' 값 때문일 수 있습니다. JSON .NET의 serializer는 날짜/시간이 특정 방식으로 포맷 될 것으로 기대합니다! – VinayC