C# 读取json文件并转化为DataTable

using Newtonsoft.Json;

string BoeProductPath = @"d:\B.json";
Common.common.DownloadFile(url, BoeProductPath);
using (StreamReader r = new StreamReader(BoeProductPath))
{
string json = r.ReadToEnd();
DataTable dt = JsonConvert.DeserializeObject(json);
dgvList.DataSource = dt;
}

posted @ 2015-06-19 22:44  peixin  阅读(905)  评论(0编辑  收藏  举报