Last Updated: February 25, 2016
·
1.005K
· ilyax

JavaScriptSerializer

Foo foo = new Foo()
foo.Name = "Anders";
foo.Surname = "Hejlsberg";
JavaScriptSerializer ser = new JavaScriptSerializer();

Console.WriteLine(ser.Serialize(foo));

JavaScriptSerializer namespace is System.Web.Script.Serialization