- Community aggregator
- Country: United States
JSON to XML: Why an Array Needs a Root Element
JSON to XML: Why an Array Needs a Root Element A JSON object with one key can still need an extra wrapper when that key holds an array. This is the small input I use to check that case: { "item" : [ 1 , 2 ] } The array contains two values. An XML document still needs one document element. The XML…