Deserialize JSON string to Dictionary

后端 未结 5 1725
长情又很酷
长情又很酷 2020-11-30 04:32

I have this string:

[{ \"processLevel\" : \"1\" , \"segments\" : [{ \"min\" : \"0\", \"max\" : \"600\" }] }]

I\'m deserializing the object:

5条回答
  •  渐次进展
    2020-11-30 05:17

    See mridula's answer for why you are getting null. But if you want to directly convert the json string to dictionary you can try following code snippet.

        Dictionary values = 
    JsonConvert.DeserializeObject>(json);
    

提交回复
热议问题