Two data models that do not line up
XML and JSON look similar in that both nest, but their models differ in ways that force decisions on any converter. XML distinguishes attributes from child elements, has no arrays, has no native number or boolean type, allows mixed content where text and elements sit side by side, and supports namespaces. JSON has arrays and typed scalars, one kind of member, and no namespaces.
Because of that mismatch there is no canonical mapping. Several conventions exist - JsonML, Parker, BadgerFish, and the Spark and GData variants - and each trades fidelity against readability. Parker produces clean JSON but discards attributes. BadgerFish keeps everything by prefixing attribute keys with `@`, at the cost of a noisier document. No convention is both lossless and tidy, because the models genuinely do not correspond.
The most immediate consequence is arrays. JSON has them; XML does not. A single `<item>` and a list of `<item>` elements look structurally identical to an XML parser, so the converter cannot tell a one-element collection from a scalar. This is the single most common source of bugs in XML/JSON interchange.