1.下载并应用LitJson,DLL文件
2.建两个类;
代码如下:
public class JsonData
{
public string result { get; set; }
public List<GameData> info { get; set; }
}
public GameData()
{ }
#region Model
private int _id;
private string _dept;
private string _sid;
private string _oldsid;
private string _userid;
private string _roleid;
private string _rolename;
private string _rolelevel;
private string _gold;
private string _money;
private string _inittime;
private string _lastlogin;
private string _querytime;
/// <summary>
///
/// </summary>
public int ID
{
set { _id = value; }
get { return _id; }
}
/// <summary>
/// 平台编号
/// </summary>
public string dept
{
set { _dept = value; }
get { return _dept; }
}
/// <summary>
/// 服务器编号
/// </summary>
public string sid
{
set { _sid = value; }
get { return _sid; }
}
/// <summary>
新闻热点
疑难解答