Last Updated: February 25, 2016
·
1.011K
· 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