[Serializable]
[DataContract]
public class UserJson
{
[DataMember]
public Int64 uid
{ get; set; }
[DataMember]
public string username
{ get; set; }
[DataMember]
public string pwd
{ get; set; }
}
public class Json
{
public void ReadJson(string JsonStr)
{
JavaScriptSerializer jss = new JavaScriptSerializer();
UserJson userJson = jss.Deserialize<UserJson>(JsonStr);
}
}
C# 解析json格式字符串
最新推荐文章于 2024-06-20 10:32:17 发布