string strJson=new JavaScriptSerializer().Serialize(a);
需要添加System.Web.Extensions.dll庫文件引用
需要引用System.Web.Script.Serialization命名空間