[Home] [By Thread] [By Date] [Recent Entries]

  • From: Henry Luo <henry@p...>
  • To: "Liam R. E. Quin" <liam@f...>, xml-dev@l...
  • Date: Thu, 12 Jul 2018 23:18:58 +0800

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]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member