JsonConvert.DeserializeAnonymousType

 string JsApiTicketString = string.Empty;
using (StreamReader reader = new StreamReader(response.GetResponseStream()))
{
JsApiTicketString = reader.ReadToEnd();
LogWriter.ToTrace(string.Format("获取JSAPITicke 结果:{0}", JsApiTicketString));
}
var jsApiTicketObj = new { Code = "", ErrorMessage = "", AppId = "", JsApiTicket = "" }; var ticketObj = JsonConvert.DeserializeAnonymousType(JsApiTicketString, jsApiTicketObj);
ticket = ticketObj.JsApiTicket;

  

上一篇:[Oracle]OWI学习笔记--001


下一篇:用Zend OPCache提高PHP的性能