C# Json.Net DataTable to JArray

var strSql = string.Format(@"select * from <tablename>;");
DataTable dt = ExecuteDataTable(strSql);
JArray result = Newtonsoft.Json.Linq.JArray.FromObject(dt));

posted @ 2023-02-17 17:55  nil  阅读(86)  评论(0编辑  收藏  举报