List<Test> _Test = new List<Test>();
DataContractJsonSerializer _Json = new DataContractJsonSerializer(_Test.GetType());
byte[] _Using = System.Text.Encoding.UTF8.GetBytes(_JsonText);
System.IO.MemoryStream _MemoryStream = new System.IO.MemoryStream(_Using);
_MemoryStream.Position = 0;
_Test = (List<Test>)_Json.ReadObject(_MemoryStream);
}[/code]
Text类
[code=csharp] public class Test
{
public string id { get; set; }
public string name { get; set; }
}[/code] 作者: 记忆 时间: 2013-1-18 16:41