.Net 內 建
using System.Web.Script.Serialization;
var modelList = abc.ToArray();
var stringTemp = new JavaScriptSerializer().Serialize(modelList);
方法二:
另外載入DLL
using Newtonsoft.Json;
var modelList = abc.ToArray();
var turnToJson = JsonConvert.SerializeObject(modelList , Formatting.Indented);