开发者

Json.Net library JsonConvert

开发者 https://www.devze.com 2022-12-27 04:49 出处:网络
I\'m using http://json.codeplex.com library. I\'m trying to convert XML to JSON and vice-versa. However they have an example us开发者_Python百科ing JsonConvert class

I'm using http://json.codeplex.com library. I'm trying to convert XML to JSON and vice-versa.

However they have an example us开发者_Python百科ing JsonConvert class

    XmlDocument doc = new XmlDocument();
    doc.LoadXml(xml);
    string jsonText = JsonConvert.SerializeXmlNode(doc);

I can't find JsonConvert in namespace Newtonsoft.Json. I've only found class JavaScriptConvert.

Any ideas?


You have an old version of Json.NET. JavaScriptConvert was renamed to JsonConvert a couple of years ago.

0

精彩评论

暂无评论...
验证码 换一张
取 消