IM tyring反序列化我的對象從具有以下格式客戶端來:JSON對象反序列化
{'goalplans':
[{"goalPlan":0,"accountId":11,"objectiveId":17,"activity":35,"acctOwner":0,"planDay":"1/30/2013","spend_budget":12,"sortBy":0,"activityFlag":0},
{"goalPlan":0,"accountId":11,"objectiveId":17,"activity":35,"acctOwner":0,"planDay":"1/30/2013","spend_budget":12,"sortBy":0,"activityFlag":0},
{"goalPlan":0,"accountId":11,"objectiveId":17,"activity":35,"acctOwner":0,"planDay":"1/30/2013","spend_budget":12,"sortBy":0,"activityFlag":0},
{"goalPlan":0,"accountId":11,"objectiveId":17,"activity":35,"acctOwner":0,"planDay":"1/30/2013","spend_budget":12,"sortBy":0,"activityFlag":0},
{"goalPlan":0,"accountId":11,"objectiveId":17,"activity":35,"acctOwner":0,"planDay":"1/30/2013","spend_budget":12,"sortBy":0,"activityFlag":0},
{"goalPlan":0,"accountId":11,"objectiveId":17,"activity":35,"acctOwner":0,"planDay":"1/30/2013","spend_budget":12,"sortBy":0,"activityFlag":0}
]}
的事情是,我不是能deserialze它在我的服務器端。
請告訴我如何反序列化Json對象到列表對象,如 列表。我嘗試了很多方法,但沒有工作。
在我看來就像它應該是一個詞典<字符串,列表<詞典<字符串,字符串>>>(也可能是最後一個字符串應該是int,我不記得,如果JavaScriptSerializer會做整型。 ) – Rawling 2011-12-15 12:52:17
編輯過,它只是用於示例@Rawling,在這種情況下,我們根本不需要字典 – 2011-12-15 12:58:30