JavaScriptSerializer

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

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

O namespace JavaScriptSerializer é System.Web.Script.Serialization