I have problem with deserialize json file with square brackets and unknown name keys. Maybe someone have some idea how to do it? I readed all similar question but nothing works.
json file
[
{
"item1": {
"value1": "rhe5h45h",
"price1": "3.34"
}
},
{
"ddddd: {
"value1": "cef3f",
"price1": "1.1",
}
},
{
"rrrrr678": {
"value1": "dfdf",
"price1": "2"
}
}
]
class
public class itemList
{
[JsonProperty("value1")]
public string value1 { get; set; }
[JsonProperty("price1")]
public double price1 { get; set; }
}
cs:
var obj = JsonConvert.DeserializeObject<Dictionary<string, itemList>>(jsonFile);