Can I make a strict deserialization with Newtonsoft.Json?

后端 未结 2 671
滥情空心
滥情空心 2021-01-18 05:28

I am using Newtonsoft.Json to serialize/deserialize objects.
As far as I know a deserialization can not be successful if the class does not have parameterless construct

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-18 05:54

    With something like this

    JsonConvert.DeserializeObject("json string", typeof(some object));
    

提交回复
热议问题