json反序列化

基础存: 对传过来的数据进行反序列化

JObject _jobj = (JObject)JsonConvert.DeserializeObject(InfoData);

JArray jArray = (JArray)_jobj["result"];

for (int i = 0; i < jArray.Count; i++)

{

TenderprojectID = jArray[i]["tenderprojectid"].ToString().Replace("\"", "");//项目ID

Bidpackages = jArray[i]["bidpackageid"].ToString().Replace("\"", "");//标段ID

BiddingbodyID = jArray[i]["biddingbodyid"].ToString().Replace("\"", "");//企业主键

BiddingbodyName = jArray[i]["biddingbodyname"].ToString().Replace("\"", "");//企业名称

LinkMan = jArray[i]["linkman"].ToString().Replace("\"", "");//报名联系人

BidPhone = jArray[i]["bidphone"].ToString().Replace("\"", "");//联系人电话

Email = jArray[i]["email"].ToString().Replace("\"", "");//联系人邮箱

Isbidct = jArray[i]["isbidct"].ToString().Replace("\"", "");//是否联合体

data = jArray[i]["data"].ToString();//联合体数据

Operatorid = jArray[i]["operatorid"].ToString().Replace("\"", "");//操作人

UserName = jArray[i]["username"].ToString().Replace("\"", "");//APP用户

}

你可能感兴趣的:(json反序列化)