13,347
社区成员
发帖
与我相关
我的任务
分享
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
xmlDoc.LoadXml("your xml string");
string jsonText = xmlDoc.SelectSingleNode("ESBEntry/MsgInfo/Msg").InnerText;
T obj = Newtonsoft.Json.JsonConvert.DeserializeObject<T>(jsonText);
string str = "{title:123,body:456,list:{title:'这是一个标题',body:'what'}}";
JObject o = JObject.Parse(str);
Console.WriteLine(o["title"]);