private void Form1_Load(object sender, EventArgs e)
{
string strJsonText = System.IO.File.ReadAllText(@"C:\1.TXT");
List<A> a = new List <A>();
DataContractJsonSerializer _Json = new DataContractJsonSerializer(a.GetType());
byte[] bUsing = System.Text.Encoding.UTF8.GetBytes(strJsonText);
System.IO.MemoryStream ms= new System.IO.MemoryStream(bUsing);
ms.Position = 0;
a =(List <A>)_Json.ReadObject(ms);
}
public class A
{
public int Id = 0;
public string Name = "";
} http://topic.csdn.net/u/20090803/11/4d2ccecb-0e30-42ba-b2ee-53dabd8aa61c.html