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

From
Henry Luo <>
To
"Liam R. E. Quin" <>,
Date
2018-07-12T15:18:58Z
ID
<>
Thread
Re: [xml-dev] How to represent mixed content in JSON and JSON Schema?
On Thu 12/7/18 10:58 PM, Liam R. E. Quin wrote:
> If you're going to do extend JSON, why not allow
>    {
>      sku: "123456789",
>      name: "argyle socks",
>      item.fabric: "organic fair-traded happily-grown thistle",
>      item.colour: "orange",
>      <description><p>hese organic socks really pop,
>        with their <bold>super-bright</bold> orange and
>        blue stripes and their sharp thistle spikes.</p>
>        <p>Commonly sold with our <itemref
> sku="83728372">SockLock</itemref> patented technology.</p>
>      </description>
>    }
Thanks for the suggestion.

Yes, there could be many different ways to extend JSON to support mixed 
content.
But I don't think just directly mixing JSON with XML is a good choice.

Mark tries to inherit or keep the simplicity of JSON as much as 
possible, both in syntax and data model.
1. In syntax, Mark uses '{ }' as the delimiters, which are already used 
by JSON, thus avoid another set of delimiters '< >', which just serve 
the same purpose.
2. Data model wise, each Mark object is still a simple JS object, just 
like JSON.
But it can cleanly represent both JSON and XML data, which I think is 
the beauty of Mark.

Regards

Henry