如何将php数组转换为c#string(xml或json)?
[ID] => 1
[CreditNo] => 2
[Date] => 2017-06-15
我找到了一些来源,但他们不工作
答案 0 :(得分:0)
将json转换为xdocument并获取结果
var xml = XDocument.Load(JsonReaderWriterFactory.CreateJsonReader(
Encoding.ASCII.GetBytes(JsonString), new XmlDictionaryReaderQuotas()));
var resultlist=xml.Descendants("item"); // to get the direct node value result as list