How can I deserialize this JSON with JsonConvert?

前端 未结 2 1104
北海茫月
北海茫月 2020-12-11 23:17

I have this JSON and I cannot figure out how to convert it to a List of objects in C#.

Here is the JSON:

{
  \"2\": {
    \"sell_average\": 239,
            


        
2条回答
  •  囚心锁ツ
    2020-12-11 23:18

    You can use

    var dict = JsonConvert.DeserializeObject>(json);
    var items = dict.Values.ToList();  //if you want a List;
    

提交回复
热议问题