怎么将多个datatable转化成一个json数组
展开全部
/// <summary>
/// 将datatable转换为json
/// </summary>
/// <param name="dtb">Dt</param>
/// <returns>JSON字符串</returns>
public static string Dtb2Json(DataTable dtb)
{
JavaScriptSerializer jss = new JavaScriptSerializer();
System.Collections.ArrayList dic = new System.Collections.ArrayList();
foreach (DataRow dr in dtb.Rows)
{/// <summary>
/// 将datatable转换为json
/// </summary>
/// <param name="dtb">Dt</param>
/// <returns>JSON字符串</returns>
public static string Dtb2Json(DataTable dtb)
{
JavaScriptSerializer jss = new JavaScriptSerializer();
System.Collections.ArrayList dic = new System.Collections.ArrayList();
foreach (DataRow dr in dtb.Rows)
{
/// 将datatable转换为json
/// </summary>
/// <param name="dtb">Dt</param>
/// <returns>JSON字符串</returns>
public static string Dtb2Json(DataTable dtb)
{
JavaScriptSerializer jss = new JavaScriptSerializer();
System.Collections.ArrayList dic = new System.Collections.ArrayList();
foreach (DataRow dr in dtb.Rows)
{/// <summary>
/// 将datatable转换为json
/// </summary>
/// <param name="dtb">Dt</param>
/// <returns>JSON字符串</returns>
public static string Dtb2Json(DataTable dtb)
{
JavaScriptSerializer jss = new JavaScriptSerializer();
System.Collections.ArrayList dic = new System.Collections.ArrayList();
foreach (DataRow dr in dtb.Rows)
{
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询