<story><title>Deprecating XML</title><url>http://norman.walsh.name/2010/11/17/deprecatingXML</url></story><parent_chain><item><author>wccrawford</author><text>&quot;XML deals remarkably well with the full richness of unstructured data.&quot;&lt;p&gt;What?  No, it doesn&apos;t.  XML has even more structure than JSON does.  Unless you&apos;re using it improperly, and the you&apos;re negating all the advantages that XML was supposed to bring.&lt;p&gt;It wasn&apos;t for &apos;mixed content&apos;.  It was for system interoperability.&lt;p&gt;The advantage that XML brings over JSON is that you can have an external document that you can use to validate any XML you&apos;re sending or receiving.  You can guarantee it&apos;s formatted correctly.  JSON provides no such guarantee.&lt;p&gt;Not that that&apos;s necessarily a bad thing.</text></item></parent_chain><comment><author>Groxx</author><text>It only provides that guarantee because the parsers have agreed to do so (and not all do, nor do they do so identically).  It&apos;s a guarantee by communal agreement, nothing more.&lt;p&gt;There&apos;s no reason a JSON format can&apos;t do the exact same thing.  JSON-RPC, for instance, defines its own rules on top of JSON which anything using it must conform to.  How hard would it be to make a set of JSON interchange rules which specify external schema documents?&lt;p&gt;edit: answer:&lt;p&gt;&lt;pre&gt;&lt;code&gt;  {json_strict_version:1, schema:{external:[url,url], internal:[{schema},{schema}]}}&lt;/code&gt;&lt;/pre&gt;</text></comment>
<story><title>Deprecating XML</title><url>http://norman.walsh.name/2010/11/17/deprecatingXML</url></story><parent_chain><item><author>wccrawford</author><text>&quot;XML deals remarkably well with the full richness of unstructured data.&quot;&lt;p&gt;What?  No, it doesn&apos;t.  XML has even more structure than JSON does.  Unless you&apos;re using it improperly, and the you&apos;re negating all the advantages that XML was supposed to bring.&lt;p&gt;It wasn&apos;t for &apos;mixed content&apos;.  It was for system interoperability.&lt;p&gt;The advantage that XML brings over JSON is that you can have an external document that you can use to validate any XML you&apos;re sending or receiving.  You can guarantee it&apos;s formatted correctly.  JSON provides no such guarantee.&lt;p&gt;Not that that&apos;s necessarily a bad thing.</text></item></parent_chain><comment><author>iampims</author><text>There&apos;s json-schema[1] if you feel like validating your json payload&lt;p&gt;[1] : &lt;a href=&quot;http://tools.ietf.org/html/draft-zyp-json-schema-02&quot; rel=&quot;nofollow&quot;&gt;http://tools.ietf.org/html/draft-zyp-json-schema-02&lt;/a&gt;</text></comment>