tags:

views:

402

answers:

1

I'm using http://json.codeplex.com library.Im 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 cant find "JsonConvert" in namespace "Newtonsoft.Json".Only class i've found is "JavaScriptConvert".

Any ideas?

A: 

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

James Newton-King
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?
NLV