赞
踩
string weixin2 = "";
weixin2 += "[{";
weixin2 += "\"Appkey\":\"88\",";
weixin2 += "\"OperationID\":\"888\",";
weixin2 += "\"Body\":{";
weixin2 += "\"Xfxx\":{";
weixin2 += "\"nsrsbh\":\"88\",";
weixin2 += "\"jqbh\":\"888\"";
weixin2 += "},";
weixin2 += "\"Xzxx\":{";
weixin2 += "\"fpdm\":\"666\",";
weixin2 += "\"fphm\":\"666\",";
weixin2 += "\"jshj\":\"666\",";
weixin2 += "\"kprq\":\"666\"";
weixin2 += "}";
weixin2 += "}";
weixin2 += "}]";
List<JObject> jobInfoList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<JObject>>(weixin2);
foreach (JObject jobInfo in jobInfoList)
{
Response.Write("UserName:" + jobInfo.Appkey);
Response.Write("UserName:" + jobInfo.Body.Xzxx.fpdm);
}
#region JObject 类
/// <summary>
///
/// </summary>
public class JObject
{
public string Appkey { get; set; }
public string OperationID { get; set; }
public Body Body { get; set; }
}
public class Body
{
public Xzxx Xzxx { get; set; }
public Xfxx Xfxx { get; set; }
}
public class Xfxx
{
public string nsrsbh { get; set; }
public string jqbh { get; set; }
}
public class Xzxx
{
public string fpdm { get; set; }
public string fphm { get; set; }
public string jshj { get; set; }
public string kprq { get; set; }
}
#endregion
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。