如何将阿里巴巴接口返回来的JSON数据转化为C#的对像? 急求
var json = {
"result":
{
"total": 38,
"toReturn":
[{
"sellerAlipayId": "2088302179419572",
"tradeType": "6",
"orderEntries":
[{
"id": 306623282075090,
"price": 2100,
"entryStatus": "waitsellersend",
"productPic": [
"http://img.china.alibaba.com:80//img/order/trading/090/570/282326603/657902513_2115513935.310x310.jpg"
],
"quantity": 1.0,
"productName": "日韩打底衫热销休闲时尚修身秋冬女装批发2011秋季新款长袖t恤",
"specInfo": [
{ "specValue": "灰色", "specName": "颜色" },
{ "specValue": "XL", "specName": "尺码" }
],
"entryDiscount": 0,
"sourceId": 1194532438
},
{
"id": 306623282085090, "price": 2100, "entryStatus": "waitsellersend", "productPic": ["http://img.china.alibaba.com:80//img/order/trading/090/580/282326603/657902513_2115513935.310x310.jpg"], "quantity": 1.0, "productName": "日韩打底衫热销休闲时尚修身秋冬女装批发2011秋季新款长袖t恤", "specInfo": [{ "specValue": "灰色", "specName": "颜色" }, { "specValue": "L", "specName": "尺码" }], "entryDiscount": 0, "sourceId": 1194532438
},
{
"id": 306623282095090, "price": 2500, "entryStatus": "waitsellersend", "productPic": ["http://img.china.alibaba.com:80//img/order/trading/090/590/282326603/639300751_2115513935.310x310.jpg"], "quantity": 1.0, "productName": "日韩打底衫热销休闲时尚修身秋冬女装批发2011秋季新款长袖t恤", "specInfo": [{ "specValue": "米黄", "specName": "颜色" }, { "specValue": "XL", "specName": "尺码" }], "entryDiscount": 0, "sourceId": 1189375286
},
{
"id": 306623282105090, "price": 2500, "entryStatus": "waitsellersend", "productPic": ["http://img.china.alibaba.com:80//img/order/trading/090/501/282326603/639300751_2115513935.310x310.jpg"], "quantity": 1.0, "productName": "日韩打底衫热销休闲时尚修身秋冬女装批发2011秋季新款长袖t恤", "specInfo": [{ "specValue": "米黄", "specName": "颜色" }, { "specValue": "L", "specName": "尺码" }], "entryDiscount": 0, "sourceId": 1189375286
}],
"gmtCreate": "2013-03-09 22:33:41",
"alipayTradeId": "2013030903674879",
"carriage": 1000,
"status": "waitsellersend",
"toPost": "050000",
"buyerAlipayId": "2088702315601799",
"sumPayment": 10200,
"buyerMemberId": "b2b-780439050",
"toArea": "河北省 石家庄市 桥西区 西里街XXXXX",
"discount": 0,
"id": 306623282065090,
"toMobile": "15130XXXXXX",
"sellerMemberId": "xiaogoXXXXXX",
"gmtPayment": "2013-03-09 22:35:01",
"toFullName": "XXX"
}],
"success": true
}
};
public class myDataType
{
public myResultType result;
}
public class myResultType
{
public int total;
public bool success;
public myReturnType[] toReturn;
}
public class myReturnType
{
public string sellerAlipayId;
.........
}
public class Rootobject
{
public Result result { get; set; }
}
public class Result
{
public int total { get; set; }
public Toreturn[] toReturn { get; set; }
public bool success { get; set; }
}
public class Toreturn
{
public string sellerAlipayId { get; set; }
public string tradeType { get; set; }
public Orderentry[] orderEntries { get; set; }
public string gmtCreate { get; set; }
public string alipayTradeId { get; set; }
public int carriage { get; set; }
public string status { get; set; }
public string toPost { get; set; }
public string buyerAlipayId { get; set; }
public int sumPayment { get; set; }
public string buyerMemberId { get; set; }
public string toArea { get; set; }
public int discount { get; set; }
public long id { get; set; }
public string toMobile { get; set; }
public string sellerMemberId { get; set; }
public string gmtPayment { get; set; }
public string toFullName { get; set; }
}
public class Orderentry
{
public long id { get; set; }
public int price { get; set; }
public string entryStatus { get; set; }
public string[] productPic { get; set; }
public float quantity { get; set; }
public string productName { get; set; }
public Specinfo[] specInfo { get; set; }
public int entryDiscount { get; set; }
public int sourceId { get; set; }
}
public class Specinfo
{
public string specValue { get; set; }
public string specName { get; set; }
}