Convert XML to Json Array when only one object

In case it helps anyone, further to meda's reply. Here's how you make this work with XElement rather than xmlTextWriter and XDocument

XNamespace ns = "http://james.newtonking.com/projects/json";
var items = new XElement("items",new XAttribute(XNamespace.Xmlns+"json",ns));

   items.Add(new XElement("item",new XAttribute(ns+"Array",true),
                        new XElement("name", "name"),
                        new XElement("Detail", "detail")));

then to convert it

 XmlDocument doc = new XmlDocument();
            doc.LoadXml(items.ToString());
            var converted JsonConvert.SerializeXmlNode(doc);

Read this documentation about Serialize Xml Node

You can force JSON Array this way

var xml = @"<Items xmlns:json='http://james.newtonking.com/projects/json' >
             <Item json:Array='true'>
                <Name>name</Name>
                 <Detail>detail</Detail>    
            </Item>
            </Items>";

DEMO