From Scottgu's post i got the code to Serialize a collection to JSON object.(i)How to convert the JSON object back to List? (ii) I did not find JavaScriptserializer in System.Runtime.Serialization will the only code work for VS 2010?
ScottGu's snippet
namespace ScottGuHelper.JSON
{
public static class JSONHelper
{
public static string ToJSON(this object obj)
{
JavaScriptserializer serializer=new JavaScriptserializer();
return serializer.serialize(obj);
}
public static string ToJSON(this object obj,int recursionDepth)
{
JavaScriptserializer serializer=new Javascriptserializer();
serializer.RecursionLimit=recursionDepth;
return serializer.serialize(obj);
}
}
}