You need to add a reference System.Runtime.Serialization.dll
[{"CID": 2, "CNAME": "\u767d\u841d\u535c", "Amount": +, "price": "+"},{"CID": 3, "CNAME": "\u80e1\u841d\u535c", " Amount ": +," price ":"},{"CID": 4, "CNAME": "\u7389\u7c73", "Amount": 7, "Price": "},{" CID ":", "CNAME": "\u897f\ U74DC "," Amount ": 7," Price ":"},{"CID": 5, "CNAME": "\U571F\U8C46", "Amount": 3, "Price": "},{", "CID": 1, "cname": "\ u8349\u8393 "," Amount ": 427," price ":"},{"CID": "," CName ":" \U5357\U74DC "," Amount ": 303," Price ":" $ "},{" CID ": 11, "CNAME": "\u82f9\u679c", "Amount": 1, "Price": "},{", "CId": $, "CNAME": "\U77F3\U69B4", "Amount": 4, "Price": "54"},{" CID ":", "CNAME": "\U6843\U5B50", "Amount": 3, "Price": "},{" CID ":", "CNAME": "\u9999\u8549", "Amount": 9, "Price": " "},{" CID ":", "CNAME": "\u8461\u8404", "Amount": 7, "Price": "},{" CID ":", "CNAME": "\U67DA\U5B50", "Amount": 1, " Price ":"},{"CID": "CNAME": "\u83e0\u841d", "Amount": 5, "Price": "},{" CID ":", "CNAME": "\u6a59\u5b50", " Amount ":", "Price": "$"}]
protected void Page_Load (object sender, EventArgs e)
{
String _jsontext = System.IO.File.ReadAllText (@ "D:\2.txt");
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);
}
public class Test
{
public int cId = 0;
public string cName = "";
public int amount = 0;
public string price = "";
}
Convert JSON to list collection