<?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>Mon, 23 Jan 2012 17:37:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Lee</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-360098</link>
		<dc:creator>Lee</dc:creator>
		<pubDate>Tue, 29 Mar 2011 06:24:29 +0000</pubDate>
		<guid isPermaLink="false">#comment-360098</guid>
		<description>Yes, being a programmer I completely disagree with you because I can already envision the code which is not all that big and can simply make use of the user function that current parsers already permit.
All the developer would have to do is check for the namespace node on the root in his own function which actually makes it easy for him/her to bypass wrong json and use a variable string to capture the name correctly, for instance:
t = &#039;&#039;;
if (root.namespace) { t = &#039;ns_&#039;; }
switch (name) {
case &#039;plist&#039;: l = obj[name];
  for (i = 0...) { o = l[i][t + &#039;person&#039;];... }
} // not hard and the middle function would simply be a modified version of the one further above.</description>
		<content:encoded><![CDATA[<p>Yes, being a programmer I completely disagree with you because I can already envision the code which is not all that big and can simply make use of the user function that current parsers already permit.<br />
All the developer would have to do is check for the namespace node on the root in his own function which actually makes it easy for him/her to bypass wrong json and use a variable string to capture the name correctly, for instance:<br />
t = &#8221;;<br />
if (root.namespace) { t = &#8216;ns_&#8217;; }<br />
switch (name) {<br />
case &#8216;plist&#8217;: l = obj[name];<br />
  for (i = 0&#8230;) { o = l[i][t + 'person'];&#8230; }<br />
} // not hard and the middle function would simply be a modified version of the one further above.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Administrator</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-360085</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Tue, 29 Mar 2011 03:08:33 +0000</pubDate>
		<guid isPermaLink="false">#comment-360085</guid>
		<description>All of which makes the JSON 10x more painful to deal with. How much easier it would be to just parse the JSON in as is, no translations and be done with it. Because names are DNS they are all unique and even human readable. With the containment proposal every path gets long and longer. But oh well, I think we can just agree to disagree.</description>
		<content:encoded><![CDATA[<p>All of which makes the JSON 10x more painful to deal with. How much easier it would be to just parse the JSON in as is, no translations and be done with it. Because names are DNS they are all unique and even human readable. With the containment proposal every path gets long and longer. But oh well, I think we can just agree to disagree.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lee</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-359994</link>
		<dc:creator>Lee</dc:creator>
		<pubDate>Sun, 27 Mar 2011 18:56:02 +0000</pubDate>
		<guid isPermaLink="false">#comment-359994</guid>
		<description>Namespace ids can be used, if the object isn&#039;t created then the namespace id will not be loaded into the parent object. Even if the programmer doesn&#039;t test for the existence v.NAME the script will fail to continue because it has no data to work with. e.g:
ns : { g : { id : &#039;person&#039;, name : &#039;org.foo&#039;, src : &#039;URL&#039; } }, data : { ns_g : { fname : &#039;Lee&#039; } } // ns_g would tell the parser to create a object called person in data using ns_g data as the default properties and their corresponding values
// then...
if (json.person) {
 // continue
} else { 
 // root is not data
} // for arrays the parser would wrap an object around person before adding it to the array</description>
		<content:encoded><![CDATA[<p>Namespace ids can be used, if the object isn&#8217;t created then the namespace id will not be loaded into the parent object. Even if the programmer doesn&#8217;t test for the existence v.NAME the script will fail to continue because it has no data to work with. e.g:<br />
ns : { g : { id : &#8216;person&#8217;, name : &#8216;org.foo&#8217;, src : &#8216;URL&#8217; } }, data : { ns_g : { fname : &#8216;Lee&#8217; } } // ns_g would tell the parser to create a object called person in data using ns_g data as the default properties and their corresponding values<br />
// then&#8230;<br />
if (json.person) {<br />
 // continue<br />
} else {<br />
 // root is not data<br />
} // for arrays the parser would wrap an object around person before adding it to the array</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Administrator</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-359992</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Sun, 27 Mar 2011 16:51:42 +0000</pubDate>
		<guid isPermaLink="false">#comment-359992</guid>
		<description>Because people would just ignore the . and the _. The moral equivalent happened with XML namespaces.</description>
		<content:encoded><![CDATA[<p>Because people would just ignore the . and the _. The moral equivalent happened with XML namespaces.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lee</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-358127</link>
		<dc:creator>Lee</dc:creator>
		<pubDate>Wed, 02 Mar 2011 08:31:52 +0000</pubDate>
		<guid isPermaLink="false">#comment-358127</guid>
		<description>How would it fail if the object/property and namespace had the same name? For a name to be identified as a namespace a dot character or _ in my suggestion would first need to present which a normal name does not have.</description>
		<content:encoded><![CDATA[<p>How would it fail if the object/property and namespace had the same name? For a name to be identified as a namespace a dot character or _ in my suggestion would first need to present which a normal name does not have.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Administrator</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-358122</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Wed, 02 Mar 2011 04:25:55 +0000</pubDate>
		<guid isPermaLink="false">#comment-358122</guid>
		<description>Because they have no choice but to get it right. If they want to parse incoming data then they have to parse it with the full name. No shortcuts would work (other than position based which yes, people will do). With namespaces people just ignore the namespace and parse the names directly with the result that if you have name collision things just fail. By having every name be unique this isn&#039;t an issue.</description>
		<content:encoded><![CDATA[<p>Because they have no choice but to get it right. If they want to parse incoming data then they have to parse it with the full name. No shortcuts would work (other than position based which yes, people will do). With namespaces people just ignore the namespace and parse the names directly with the result that if you have name collision things just fail. By having every name be unique this isn&#8217;t an issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lee</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-358058</link>
		<dc:creator>Lee</dc:creator>
		<pubDate>Tue, 01 Mar 2011 10:26:44 +0000</pubDate>
		<guid isPermaLink="false">#comment-358058</guid>
		<description>That might be easy but I don&#039;t see how that would be better than the original purpose of namespaces.
People who use them badly are just amateurs and likely won&#039;t have a server load big enough to be concerned with doing it right.</description>
		<content:encoded><![CDATA[<p>That might be easy but I don&#8217;t see how that would be better than the original purpose of namespaces.<br />
People who use them badly are just amateurs and likely won&#8217;t have a server load big enough to be concerned with doing it right.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Administrator</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-358033</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Tue, 01 Mar 2011 03:20:29 +0000</pubDate>
		<guid isPermaLink="false">#comment-358033</guid>
		<description>That&#039;s indeed my proposal to easy processing.</description>
		<content:encoded><![CDATA[<p>That&#8217;s indeed my proposal to easy processing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lee</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-357661</link>
		<dc:creator>Lee</dc:creator>
		<pubDate>Wed, 23 Feb 2011 17:53:38 +0000</pubDate>
		<guid isPermaLink="false">#comment-357661</guid>
		<description>The point in namespaces is to be templates that say what data is permitted and what value to give data that is not defined. From my understanding of what your trying to say is that the implementation should be changed to global objects rather than templates.</description>
		<content:encoded><![CDATA[<p>The point in namespaces is to be templates that say what data is permitted and what value to give data that is not defined. From my understanding of what your trying to say is that the implementation should be changed to global objects rather than templates.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Administrator</title>
		<link>http://www.goland.org/jsonnamespace/comment-page-1/#comment-357659</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Wed, 23 Feb 2011 17:35:44 +0000</pubDate>
		<guid isPermaLink="false">#comment-357659</guid>
		<description>I think we are talking past each other. I understand that the JSON can be transformed. But it is my personal belief (I can&#039;t prove I&#039;m right) based on what I saw with XML that most people will screw up the namespace translation and as a consequence the namespace mechanism will fail in practice even though it should work in theory. That&#039;s why I went for globally unique names instead since they require zero additional code, they just work, no effort required.</description>
		<content:encoded><![CDATA[<p>I think we are talking past each other. I understand that the JSON can be transformed. But it is my personal belief (I can&#8217;t prove I&#8217;m right) based on what I saw with XML that most people will screw up the namespace translation and as a consequence the namespace mechanism will fail in practice even though it should work in theory. That&#8217;s why I went for globally unique names instead since they require zero additional code, they just work, no effort required.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

