2
我的C#類JSON數組數據
public class City
{
public int City_id { get; set; }
public string City_name { get; set; }
}
public class Model
{
public City[] lstCitiesResult { get; set; }
}
我的代碼:
namespace gtp2
{
....
List<Model> li = new List<Model>();
WebClient re = new WebClient();
var data = re.DownloadString("url");
var a = JsonConvert.DeserializeObject<Model>(data);
Response.Write(a.lstCitiesResult.ToString());
....
}
在回覆於我得到這樣的:gtp2.City [ ]任何Ideya?在此先感謝
非常感謝你...... @codebiz – Narasi