ozsenegal
ozsenegal

Reputation: 4133

Json.Net library JsonConvert

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

However they have an example using 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?

Upvotes: 1

Views: 22792

Answers (1)

James Newton-King
James Newton-King

Reputation: 49042

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

Upvotes: 6

Related Questions