我确实解决了这种问题
// Handle JsonConvert array bugvar rows = doc.SelectNodes("//Row");if(rows.Count == 1){ var contentNode = doc.SelectSingleNode("//List/Content"); contentNode.AppendChild(doc.CreateNode("element", "Row", "")); // Convert to JSON and replace the empty element we created but keep the array declaration returnJson = JsonConvert.SerializeXmlNode(doc).Replace(",null]", "]");}else{ // Convert to JSON returnJson = JsonConvert.SerializeXmlNode(doc);}有点脏,但是可以用。我仍然对其他解决方案感兴趣!



