Re: [xml-dev] How to represent mixed content in JSON and JSON Schema?

From
Norman Gray <>
To
"Liam R. E. Quin" <>
Date
2018-07-13T00:01:17Z
ID
<>
Thread
Re: [xml-dev] How to represent mixed content in JSON and JSON Schema?
Greetings.

On 12 Jul 2018, at 15:58, Liam R. E. Quin wrote:

> Yes. We saw this also back in Perl days, with some XML libraries using
> a mix of an array for contents and a hash for attributes,

A tangent:

I remember having a fairly noisy row with a colleague a few years ago, 
who asserted that the XML spec didn't require that XML processors 
preserve the ordering of element children.  The grounds for this 
appeared to be that the best-known Perl XML library didn't do this 
(because it used a hash for element children as well as for attributes), 
and surely Perl could do no wrong.

Entertainingly, the XML spec does not in fact explicitly require that 
elements be presented to the application in document order.  But it 
omits that requirement on the grounds (and I think I can cite chapter 
and verse on this) that such a requirement is so screamingly obvious 
that it would be bloody silly to spell it out.

Best wishes,

Norman


-- 
Norman Gray  :  https://nxg.me.uk