Why have warning Newtonsoft.Json.JsonConvert.DeserializeObjectAsync

只谈情不闲聊 提交于 2019-12-05 18:47:07

The library authors decided that it was not the responsibility of the library to provide asynchronous wrappers and marked them obsolete. (see http://blogs.msdn.com/b/pfxteam/archive/2012/03/24/10287244.aspx). In future versions these methods will be removed. You should do something like this instead:

var result = await 
    Task.Factory.StartNew(() => JsonConvert.DeserializeObject<MyObject>(jsonText));
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!