一.首先将表单主体序列化为json对象. 方法: //将表单序列化为json,这里加了个jQuery的扩展方法 $.fn.serializeJson = function () { var result = {}; var array = this.serializeArray(); $(array).each(function () { if (result[this.name]) { if ($.isArray(result[this.name])) { result[this.name].
环境说明:Silverlight 5.1,.Net Framework 4.0 1.添加引用System.ServiceModel.Web.dll. 因为 System.Runtime.Serialization.Json.DataContractJsonSerializer 类的引用是在System.ServiceModel.Web.dll这个程序集中. 2.代码如下 using System; using System.Collections.Generic; using System.