<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Adding Namespaces to JSON</title>
	<atom:link href="http://www.goland.org/jsonnamespace/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.goland.org/jsonnamespace/</link>
	<description>Technology, Politics, Food, Finance, etc.</description>
	<lastBuildDate>Thu, 04 Mar 2010 05:45:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Anthony Carrico</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-24180</link>
		<dc:creator>Anthony Carrico</dc:creator>
		<pubDate>Fri, 27 Oct 2006 15:31:33 +0000</pubDate>
		<guid isPermaLink="false">#comment-24180</guid>
		<description>I came across your page searching for JSON schema conventions, not namespaces, but anyway just a note:

You wrote, &#039;&quot;/&quot; is illegal unescaped in a JSON string&#039;. I&#039;m looking at RFC 4627 which lists this ABNF rule:

  unescaped = %x20-21 / %x23-5B / %x5D-10FFFF

&#039;/&#039; is %x2F, which falls in the second legal range for unescaped string characters. Similarly, www.json.org lists legal unescaped characters as:

  any-Unicode-except-&quot;-or-\-or-control

&#039;/&#039;is neither &#039;&quot;&#039; nor &#039;\&#039; nor a control character, so it is also legal by this definition.</description>
		<content:encoded><![CDATA[<p>I came across your page searching for JSON schema conventions, not namespaces, but anyway just a note:</p>
<p>You wrote, &#8216;&#8221;/&#8221; is illegal unescaped in a JSON string&#8217;. I&#8217;m looking at RFC 4627 which lists this ABNF rule:</p>
<p>  unescaped = %x20-21 / %x23-5B / %x5D-10FFFF</p>
<p>&#8216;/&#8217; is %x2F, which falls in the second legal range for unescaped string characters. Similarly, <a href="http://www.json.org" rel="nofollow">http://www.json.org</a> lists legal unescaped characters as:</p>
<p>  any-Unicode-except-&#8221;-or-\-or-control</p>
<p>&#8216;/&#8217;is neither &#8216;&#8221;&#8216; nor &#8216;\&#8217; nor a control character, so it is also legal by this definition.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Administrator</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-18591</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Thu, 17 Aug 2006 02:43:11 +0000</pubDate>
		<guid isPermaLink="false">#comment-18591</guid>
		<description>The schema is a helper object, it should never be required, but it can be useful.

If you are using designated extension zones then why have a structured data format at all? Why not just have flat name/value pairs and use links for structure (ala RDF)? If structure matters then placing your extensions in the right place in the structure matters. Extension zones, by definition, allow extensions only in pre-approved places. So if the right place for your extension is somewhere other than the blessed extension zone then your SOL. I think you either have to pick a RDF style approach or you have to allow arbitrary extensibility, but you can&#039;t have it both ways.

I actually am a big fan of the wrapper object approach. If you are changing something in a manner that isn&#039;t backwards compatible (and therefore needs a must understand to point this out) then you should change the parent element because you are breaking the contract.</description>
		<content:encoded><![CDATA[<p>The schema is a helper object, it should never be required, but it can be useful.</p>
<p>If you are using designated extension zones then why have a structured data format at all? Why not just have flat name/value pairs and use links for structure (ala RDF)? If structure matters then placing your extensions in the right place in the structure matters. Extension zones, by definition, allow extensions only in pre-approved places. So if the right place for your extension is somewhere other than the blessed extension zone then your SOL. I think you either have to pick a RDF style approach or you have to allow arbitrary extensibility, but you can&#8217;t have it both ways.</p>
<p>I actually am a big fan of the wrapper object approach. If you are changing something in a manner that isn&#8217;t backwards compatible (and therefore needs a must understand to point this out) then you should change the parent element because you are breaking the contract.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete Dapkus</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-18586</link>
		<dc:creator>Pete Dapkus</dc:creator>
		<pubDate>Thu, 17 Aug 2006 00:57:28 +0000</pubDate>
		<guid isPermaLink="false">#comment-18586</guid>
		<description>Yes, I was trying to draw you out a bit.  No question that self-describing is a big win.   I guess I&#039;m more inclined to go the &quot;no schema&quot; route, just because it seems like expressing a message format that is just extensible enough and no more is a bit of a fool&#039;s errand.   Neither the producer or the consumer can really do it alone.     

In a previous life, I did a fair amount of work with ASN.1 (including working on the spec for an ASN.1 based standard).  In my original comment, I was proposing designated extensions zones for JSON.  

if it didn&#039;t violate my requirement of assuming nothing of the receiver, I&#039;d also propose mustUnderstand for imported fields.

(I suppose you could kludge one by make a wrapper object in another namespace, adding your field, and making the original message a field on the wrapper.)</description>
		<content:encoded><![CDATA[<p>Yes, I was trying to draw you out a bit.  No question that self-describing is a big win.   I guess I&#8217;m more inclined to go the &#8220;no schema&#8221; route, just because it seems like expressing a message format that is just extensible enough and no more is a bit of a fool&#8217;s errand.   Neither the producer or the consumer can really do it alone.     </p>
<p>In a previous life, I did a fair amount of work with ASN.1 (including working on the spec for an ASN.1 based standard).  In my original comment, I was proposing designated extensions zones for JSON.  </p>
<p>if it didn&#8217;t violate my requirement of assuming nothing of the receiver, I&#8217;d also propose mustUnderstand for imported fields.</p>
<p>(I suppose you could kludge one by make a wrapper object in another namespace, adding your field, and making the original message a field on the wrapper.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Administrator</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-18359</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Sat, 12 Aug 2006 06:15:02 +0000</pubDate>
		<guid isPermaLink="false">#comment-18359</guid>
		<description>An outstanding question! One I wish I heard more (although I was pretty happy when my dev lead made the same point). Why bother with self describing if you are going to have a schema?

There are a couple of answer. My personal favorite is - ease of programming and debugging.

If you had asked me 11 or 12 years ago if self describing data was important I&#039;m not sure I&#039;d say yes. I&#039;d probably say &#039;naah, perf matters more, encode it, compress it, whatever, so long as your debugging tools can decompress it, who cares?&#039;

Then HTTP happened. I have to admit that I wouldn&#039;t have believed it if I hadn&#039;t lived through it. But it turns out that having protocols and data formats that are trivial to produce and trivial to write code to consume and to debug on the fly (ahh the power of Telnet, and yes, I, like others, have debugged HTTP via Telnet, I&#039;m probably just old though) makes it remarkably easy for people to adopt your protocol/data format.

By way of comparison lets look at something like EDI or even LDAP. Both use heavily schema&#039;d binary protocols. The good news is that they are very efficient. The bad news is that you can&#039;t use printf (or write or whatever your favorite text output is) to produce them, forget scanf for consuming them and lord help you if you ever need to debug them. Yes, you can get special tools that will decode them on the fly, if you have the schema. If you don&#039;t have the schema (e.g. you are debugging a network and not sure what&#039;s flying around) then you&#039;re completely screwed, all you have is a collection of position based fields. Good luck.

Not being able to easily write, consume or debug a protocol or data format turns out to put a huge barrier to entry between the programmer and the format. Which is why I believe that HTTP and even XML took off while LDAP and EDI live in very special closed off communities. Of course given how much money goes over EDI maybe I should pray for failure but that&#039;s a separate issue.

The other reason that self describing formats really, really matter is extensibility. Extensibility covers the stuff that isn&#039;t in the schema. In theory you can fix this by designated extension zones. LDAP does something like this. They hacked their binary format to allow people to add in arbitrary properties. But only in certain places. Of course if the best place for your extension isn&#039;t the place people thought would be best then you&#039;re screwed. In theory this doesn&#039;t matter since you can use links to hook things together but if &#039;you can just link it together&#039; really worked we would all be using RDF. It turns out that location matters for understanding so you really want to be able to put your extensions next to the thing being extended. Not in some random location that someone decided extensions might make sense in.

And, here&#039;s the best part, LDAP&#039;s extension properties are self describing name/value pairs. Why self describing? Because it turns out that multiple different groups want to simultaneously expand the same entry. The schema is useless here because the groups aren&#039;t coordinating so there is no central schema so without a self describing format (and some kind of name collision avoidance mechanism, hence namespaces) everyone ends up with an unreadable mess (bytes 15-30 are mine damnit! No, they are mine!). So if we ever want to be able to expand messages after they are released (and if the HTTP taught us anything it&#039;s don&#039;t paint yourself into a corner) then we need self describing formats, even when we have schemas.

In fact my own interest in schemas is primarily for marshaling and extensibility. Specifically, I want to use a schema so a programmer can say &quot;This is the message I&#039;m expecting and here&#039;s how I want to rip it into memory&quot; and I also want the programmer to be able to use the schema as a filter to rip out any extensions they don&#039;t support so their code doesn&#039;t blow up if they are sent a message with an extension that didn&#039;t exist when the code was written.

So, to summarize (this really should be a blog article) I want a self describing format even when I have a schema because it makes it easier to write data, read data, debug data and extend data.</description>
		<content:encoded><![CDATA[<p>An outstanding question! One I wish I heard more (although I was pretty happy when my dev lead made the same point). Why bother with self describing if you are going to have a schema?</p>
<p>There are a couple of answer. My personal favorite is &#8211; ease of programming and debugging.</p>
<p>If you had asked me 11 or 12 years ago if self describing data was important I&#8217;m not sure I&#8217;d say yes. I&#8217;d probably say &#8216;naah, perf matters more, encode it, compress it, whatever, so long as your debugging tools can decompress it, who cares?&#8217;</p>
<p>Then HTTP happened. I have to admit that I wouldn&#8217;t have believed it if I hadn&#8217;t lived through it. But it turns out that having protocols and data formats that are trivial to produce and trivial to write code to consume and to debug on the fly (ahh the power of Telnet, and yes, I, like others, have debugged HTTP via Telnet, I&#8217;m probably just old though) makes it remarkably easy for people to adopt your protocol/data format.</p>
<p>By way of comparison lets look at something like EDI or even LDAP. Both use heavily schema&#8217;d binary protocols. The good news is that they are very efficient. The bad news is that you can&#8217;t use printf (or write or whatever your favorite text output is) to produce them, forget scanf for consuming them and lord help you if you ever need to debug them. Yes, you can get special tools that will decode them on the fly, if you have the schema. If you don&#8217;t have the schema (e.g. you are debugging a network and not sure what&#8217;s flying around) then you&#8217;re completely screwed, all you have is a collection of position based fields. Good luck.</p>
<p>Not being able to easily write, consume or debug a protocol or data format turns out to put a huge barrier to entry between the programmer and the format. Which is why I believe that HTTP and even XML took off while LDAP and EDI live in very special closed off communities. Of course given how much money goes over EDI maybe I should pray for failure but that&#8217;s a separate issue.</p>
<p>The other reason that self describing formats really, really matter is extensibility. Extensibility covers the stuff that isn&#8217;t in the schema. In theory you can fix this by designated extension zones. LDAP does something like this. They hacked their binary format to allow people to add in arbitrary properties. But only in certain places. Of course if the best place for your extension isn&#8217;t the place people thought would be best then you&#8217;re screwed. In theory this doesn&#8217;t matter since you can use links to hook things together but if &#8216;you can just link it together&#8217; really worked we would all be using RDF. It turns out that location matters for understanding so you really want to be able to put your extensions next to the thing being extended. Not in some random location that someone decided extensions might make sense in.</p>
<p>And, here&#8217;s the best part, LDAP&#8217;s extension properties are self describing name/value pairs. Why self describing? Because it turns out that multiple different groups want to simultaneously expand the same entry. The schema is useless here because the groups aren&#8217;t coordinating so there is no central schema so without a self describing format (and some kind of name collision avoidance mechanism, hence namespaces) everyone ends up with an unreadable mess (bytes 15-30 are mine damnit! No, they are mine!). So if we ever want to be able to expand messages after they are released (and if the HTTP taught us anything it&#8217;s don&#8217;t paint yourself into a corner) then we need self describing formats, even when we have schemas.</p>
<p>In fact my own interest in schemas is primarily for marshaling and extensibility. Specifically, I want to use a schema so a programmer can say &#8220;This is the message I&#8217;m expecting and here&#8217;s how I want to rip it into memory&#8221; and I also want the programmer to be able to use the schema as a filter to rip out any extensions they don&#8217;t support so their code doesn&#8217;t blow up if they are sent a message with an extension that didn&#8217;t exist when the code was written.</p>
<p>So, to summarize (this really should be a blog article) I want a self describing format even when I have a schema because it makes it easier to write data, read data, debug data and extend data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-18349</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sat, 12 Aug 2006 00:11:35 +0000</pubDate>
		<guid isPermaLink="false">#comment-18349</guid>
		<description>don&#039;t think of it as pushed off into the corner; think of it as neatly packaged and prominently labeled.  

I guess I&#039;m wondering why you want from a schema?  What does it give you that &quot;self-describing&quot; doesn&#039;t give you already?   Are you trying to specify a contract?  Are you trying to get your messages into a strongly typed language?

If you&#039;re going to have a schema, why not skip the overhead of self-describing?</description>
		<content:encoded><![CDATA[<p>don&#8217;t think of it as pushed off into the corner; think of it as neatly packaged and prominently labeled.  </p>
<p>I guess I&#8217;m wondering why you want from a schema?  What does it give you that &#8220;self-describing&#8221; doesn&#8217;t give you already?   Are you trying to specify a contract?  Are you trying to get your messages into a strongly typed language?</p>
<p>If you&#8217;re going to have a schema, why not skip the overhead of self-describing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Administrator</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-18195</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Thu, 10 Aug 2006 06:23:39 +0000</pubDate>
		<guid isPermaLink="false">#comment-18195</guid>
		<description>I&#039;m not sure I know what you mean by &#039;strong types&#039;. But the article I&#039;ll be releasing in the near future on a schema for the infoset I published today will probably give you a chance to clarify.

As for &#039;imports&#039;, this format would make it difficult to directly include fields from other namespaces. They would also be &#039;children&#039; and forced off to a corner (I suppose that makes them bad children?).

But it&#039;s a fair point, I wonder how many schemas meaningfully include multiple namespaces?</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure I know what you mean by &#8217;strong types&#8217;. But the article I&#8217;ll be releasing in the near future on a schema for the infoset I published today will probably give you a chance to clarify.</p>
<p>As for &#8216;imports&#8217;, this format would make it difficult to directly include fields from other namespaces. They would also be &#8216;children&#8217; and forced off to a corner (I suppose that makes them bad children?).</p>
<p>But it&#8217;s a fair point, I wonder how many schemas meaningfully include multiple namespaces?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete Dapkus</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-18186</link>
		<dc:creator>Pete Dapkus</dc:creator>
		<pubDate>Thu, 10 Aug 2006 03:31:22 +0000</pubDate>
		<guid isPermaLink="false">#comment-18186</guid>
		<description>Two comments:   Since we&#039;re throwing the towel in on XML to a degree, can we also through the towel in on schema and declaring strong types for message formats?   It&#039;s always seemed a bit odd to have a schema for something that was also supposed to be self describing.     

second, do you really need to intermingle the data from different namespaces?   It&#039;s not like this is code.   Could you do something like :

&lt;code&gt;
{ &quot;localfield1&quot;: &quot;foo&quot;,
  &quot;localfield2&quot;: &quot;bar&quot;,
  &quot;imports&quot;: { &quot;namespace1&quot;: {&quot;myimportedfield1&quot;:&quot;baz&quot;},
                     &quot;namespace2&quot;: {&quot;myotherimportedfield&quot;:&quot;bab&quot;}
                  }
}
&lt;/code&gt;

Admittedly, I didn&#039;t give this a lot of thought.  You&#039;d probably want a more qualified name than &quot;imports&quot;, but seems like this syntax is fairly compact and you get the bonus of pretty simple processing model.

Just a thought.</description>
		<content:encoded><![CDATA[<p>Two comments:   Since we&#8217;re throwing the towel in on XML to a degree, can we also through the towel in on schema and declaring strong types for message formats?   It&#8217;s always seemed a bit odd to have a schema for something that was also supposed to be self describing.     </p>
<p>second, do you really need to intermingle the data from different namespaces?   It&#8217;s not like this is code.   Could you do something like :</p>
<p><code><br />
{ "localfield1": "foo",<br />
  "localfield2": "bar",<br />
  "imports": { "namespace1": {"myimportedfield1":"baz"},<br />
                     "namespace2": {"myotherimportedfield":"bab"}<br />
                  }<br />
}<br />
</code></p>
<p>Admittedly, I didn&#8217;t give this a lot of thought.  You&#8217;d probably want a more qualified name than &#8220;imports&#8221;, but seems like this syntax is fairly compact and you get the bonus of pretty simple processing model.</p>
<p>Just a thought.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Administrator</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-17712</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Thu, 03 Aug 2006 20:38:55 +0000</pubDate>
		<guid isPermaLink="false">#comment-17712</guid>
		<description>Actually I hadn&#039;t intended to be backwards compatible with either one. I explicitly view it as a non-goal to worry about how to re-use XML or Java&#039;s namespaces.

The infoset != JSON&#039;s data model so any attempt to map the two will either require crippling XML or making JSON as complex as XML. Both choices are unacceptable so I just don&#039;t worry about it.

As for Norm&#039;s article, I&#039;m going to stay away from this issue because I already have more things to deal with then I want to. :)</description>
		<content:encoded><![CDATA[<p>Actually I hadn&#8217;t intended to be backwards compatible with either one. I explicitly view it as a non-goal to worry about how to re-use XML or Java&#8217;s namespaces.</p>
<p>The infoset != JSON&#8217;s data model so any attempt to map the two will either require crippling XML or making JSON as complex as XML. Both choices are unacceptable so I just don&#8217;t worry about it.</p>
<p>As for Norm&#8217;s article, I&#8217;m going to stay away from this issue because I already have more things to deal with then I want to. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian Reschke</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-17693</link>
		<dc:creator>Julian Reschke</dc:creator>
		<pubDate>Thu, 03 Aug 2006 09:13:52 +0000</pubDate>
		<guid isPermaLink="false">#comment-17693</guid>
		<description>Hi Yaron,

I guess the question here is whether it&#039;s more important that the naming system is compatible with Java or with XML (and XML applications that rely on XML namespaces, such as Atom or WebDAV). It seems to me that disallowing XML namespace URIs as JSON namespace names may make it hard to use when a service talks both JSON and XML.

For the question about resolvability of names, have a look at Norman&#039;s latest blog entry (at &lt;a href=&quot;http://norman.walsh.name/2006/07/25/namesAndAddresses&quot; rel=&quot;nofollow&quot;&gt;http://norman.walsh.name/2006/07/25/namesAndAddresses&lt;/a&gt;).

Best regards, Julian</description>
		<content:encoded><![CDATA[<p>Hi Yaron,</p>
<p>I guess the question here is whether it&#8217;s more important that the naming system is compatible with Java or with XML (and XML applications that rely on XML namespaces, such as Atom or WebDAV). It seems to me that disallowing XML namespace URIs as JSON namespace names may make it hard to use when a service talks both JSON and XML.</p>
<p>For the question about resolvability of names, have a look at Norman&#8217;s latest blog entry (at <a href="http://norman.walsh.name/2006/07/25/namesAndAddresses" rel="nofollow">http://norman.walsh.name/2006/07/25/namesAndAddresses</a>).</p>
<p>Best regards, Julian</p>
]]></content:encoded>
	</item>
</channel>
</rss>
