I have problems parsing some JSON data:
{
\"title\": \"LED SIDE DIRECTION INDICATOR 9-33V CATEGORY 6, 19cm CABLE CHROME BASE LED AUTO LAMPS\",
\"us
This works with your json
var dict = new JavaScriptSerializer().Deserialize<Dictionary<string, object>>(testJson);
Console.WriteLine(dict["url"]);
var price = (Dictionary<string, object>)dict["user_price"];
Console.WriteLine(price["inc_tax_value"]);
If the fields of the json object are always the same, then you could use strong typed classes instead of dictionaries. The json serializer will serialize correctly to the following classes:
private class MyJsonClass
{
public string title { get; set; }
public UserPrice user_price { get; set; }
public int local_quantity { get; set; }
...
}
private class UserPrice
{
public decimal inc_tax_value { get; set; }
public decimal ex_tax_value { get; set; }
...
}