Asp.net中将对象转化为JSON格式的字符串
[csharp]
/// <summary>
/// Converts an object to its JSON representation.
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public static string ConvertToJson(object obj)
{
return new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(obj);
}
补充:Web开发 , ASP.Net ,