我需要從內部JSON子陣列獲取的數據,但它沒有得到轉換成列表,下面是我的JSON字符串反序列化JSON數組列出WP7
{「responseCode」:「0」,「responseObject」 :{「TotalRecords」:25,「TotalDisplayRecords」:25,「aaData」:[{「InvoiceId」:16573,「somedata ..」,「appCrmAccount(一些標題,總共100個這樣的標題) amount」:40086.00, invoiceNumber 「:」 12,帳戶名 「:」 dfgAsfsadf 「」 dueDateStr 「:」 2012" 年4月24日(數據將進入名單)
這裏是我的代碼:
var djson = new DataContractJsonSerializer(typeof(dataList));
var stream = new MemoryStream(Encoding.UTF8.GetBytes(json));
dataList result = (dataList)djson.ReadObject(stream);//not getting execute
善意幫助.. 在此先感謝。
你是什麼意思沒有得到執行?一個錯誤?例外? – 2012-04-25 05:10:25
你能在這裏發佈類「dataList」的代碼嗎?你使用DataContract和DataMember屬性嗎? – 2012-04-25 07:52:51