using System.ServiceModel; using System.ServiceModel.Web; using System.Runtime.Serialization.Json; using System.IO; namespace Common { public class JsonUtility { public static string getJsonByObject(Object obj) { //实例化DataContractJsonSerializer对象,需要待…