请教如何将以下的json格式转为DataTable

2025-04-05 08:21:20
推荐回答(1个)
回答1:

string content = string.Empty;
using (TextReader reader = new StreamReader(s))
{
content = reader.ReadToEnd();

}

System.Web.Script.Serialization.JavaScriptSerializer jss = new JavaScriptSerializer();
CarList list = jss.Deserialize(content);
List lisa = new List();

lisa.Add(list);
this.Repeater1.DataSource = lisa;
this.Repeater1.DataBind();