标签:each tst reac data 动态 json rom for ring
string josn;//json字符串
dynamic dyRS = JObject.Parse(strRS);/////转换dynamic
string dyDataStr = dyRS.data.ToString();
dynamic dyData = JObject.Parse(dyDataStr);
string flightListStr = dyData.flightList.ToString();
string flightOptionListStr = dyData.flightOptionList.ToString();
JObject jObjectFOlist = JObject.Parse(flightOptionListStr);///转换JObject
string flightOptionListStrTMP = "";
foreach (var x in jObjectFOlist)//获取
{
//x.Key 获取键
flightOptionListStrTMP = x.Value.ToString();//获取值
}
//把值转换为对象,
FlightOption flightOption = JSONObject.FromJson<FlightOption>(flightOptionListStrTMP);
标签:each tst reac data 动态 json rom for ring
原文地址:https://www.cnblogs.com/tofumoxi/p/10710908.html