I have problems parsing some JSON data:
{
"title": "LED SIDE DIRECTION INDICATOR 9-33V CATEGORY 6, 19cm CABLE CHROME BASE LED AUTO LAMPS",
"user_price": {
"inc_tax_value": 34.067,
"ex_tax_value": 30.97,
"base_inc_tax": 34.067,
"base_ex_tax": 30.97,
"currency_code": "",
"price_rule": "35"
},
"local_quantity": 0,
"global_quantity": 0,
"url": "http://ishop2.cooldrive.com.au/products/3102CM",
"all_warehouse_quantity": 0,
"description1": "LED SIDE DIRECTION INDICATOR",
"description2": "9-33V CATEGORY 6, 19cm CABLE",
"description3": "CHROME BASE LED AUTO LAMPS",
"price_per": 1,
"default_pack_quantity": 1,
"code": "3102CM"
}
I have tried a number of example but I cannot get any data from this example of product information. here is what I am trying to use:
string testJson = new HttpHelper().POST("http://ishop2.cooldrive.com.au/api/product", "code=3102CM");
System.Windows.Forms.Clipboard.SetText(testJson);
MyJsonClass tester = new System.Web.Script.Serialization.JavaScriptSerializer()
.Deserialize<MyJsonClass>(@testJson);
The text return right as above but the testJson is always null...
private class MyJsonClass
{
public IList<IDictionary<string, string>> data { get; set; }
}