XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
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


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS