1

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?

1 Answer 1

6

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

Sign up to request clarification or add additional context in comments.

1 Comment

Hello James. Does JSON.net requires .net 3.5 sp1 or can it work on .net 2.0? I used your library to serialize an XML node but i got an error. But installing .net 3.5 sp1 fixed the issue. In the requirements page i see .net 2.0 mentioned. Any ideas?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.