111,093
社区成员




try
{
string taskName = context.Request.Params["taskName"];
string xmlFile = SystemConfig.ReadDir(@"xmlCache\taskCache\" + taskName.ToString().Trim() + ".xml");
XmlDocument doc = new XmlDocument();
doc.Load(xmlFile);
string json = Newtonsoft.Json.JsonConvert.SerializeXmlNode(doc);
result = json;
}
catch(Exception ex){
result = ex.Message;
}
context.Response.Write(result);
string json = JsonConvert.SerializeObject(doc, Newtonsoft.Json.Formatting.Indented,
new JsonSerializerSettings { ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver() });
json = json.Replace("@", "");
result = json;