dynamic _modal= Newtonsoft.Json.Linq.JToken.Parse(_json_data) as dynamic;
将json字符_json_data动态解析成实体_modal,可以直接取_modal的属性字体。
JsonResult Result = (JsonResult)Pay("", "", "", "");
var jsonStr = Newtonsoft.Json.JsonConvert.SerializeObject(Result.Data);
var resModel = new { code = "", message = "", result = new { tradeNo = "", qrCode = "" } };
var i = JsonConvert.DeserializeAnonymousType(jsonStr, resModel);
if (i.code != "200")
return Result;
ActionResult query = queryOrder(_OutTransRefNo, _PltfmSeqNo);
var jsonStr = Newtonsoft.Json.JsonConvert.SerializeObject(query);
Dictionary<string, object> dir = JsonConvert.DeserializeObject<Dictionary<string, object>>(jsonStr);
var resModel_2 = new { code = "", ordercode = "", TxnSta = "" };
var queryresult = JsonConvert.DeserializeAnonymousType(dir["Data"].ToString(), resModel_2);
if (queryresult.code == "200" && queryresult.ordercode == "200")