<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: JSON vs. JavaScript</title>
	<atom:link href="http://seattlesoftware.wordpress.com/2008/01/08/javascript-vs-json/feed/" rel="self" type="application/rss+xml" />
	<link>http://seattlesoftware.wordpress.com/2008/01/08/javascript-vs-json/</link>
	<description>Skills to pay the bills.</description>
	<lastBuildDate>Wed, 23 Dec 2009 21:46:10 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ian</title>
		<link>http://seattlesoftware.wordpress.com/2008/01/08/javascript-vs-json/#comment-126</link>
		<dc:creator>Ian</dc:creator>
		<pubDate>Wed, 23 Dec 2009 21:46:10 +0000</pubDate>
		<guid isPermaLink="false">http://seattlesoftware.wordpress.com/2008/01/08/javascript-compliant-json/#comment-126</guid>
		<description>Ah, different Chris. Didn&#039;t spot that first time out.

Funny.</description>
		<content:encoded><![CDATA[<p>Ah, different Chris. Didn&#8217;t spot that first time out.</p>
<p>Funny.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://seattlesoftware.wordpress.com/2008/01/08/javascript-vs-json/#comment-125</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 23 Dec 2009 21:38:33 +0000</pubDate>
		<guid isPermaLink="false">http://seattlesoftware.wordpress.com/2008/01/08/javascript-compliant-json/#comment-125</guid>
		<description>LISTEN HERE FUDGEPACKER I KNOW EVERYTHING AND YOU MEAN NOTHING. END OF STORY NOW STFU.</description>
		<content:encoded><![CDATA[<p>LISTEN HERE FUDGEPACKER I KNOW EVERYTHING AND YOU MEAN NOTHING. END OF STORY NOW STFU.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian</title>
		<link>http://seattlesoftware.wordpress.com/2008/01/08/javascript-vs-json/#comment-124</link>
		<dc:creator>Ian</dc:creator>
		<pubDate>Wed, 23 Dec 2009 00:22:17 +0000</pubDate>
		<guid isPermaLink="false">http://seattlesoftware.wordpress.com/2008/01/08/javascript-compliant-json/#comment-124</guid>
		<description>I just re-read ECMA 262 and RFC 4627 side by side, and the grammar specifications confirm that JSON is, in fact, a strict subset of Javascript (even down to the unicode and escape sequences they both accept in their strings).

RFC 4627 explicitly says this in its introduction, of course, but that is probably best treated as non-normative (4627 is not a specification, in any case). The detailed production rules confirm it though.

I came across your blog post because I had a client who insisted that JSON wasn&#039;t a subset of Javascript, and hunting around the source of this urban myth seemed to be your blog. Most other sources (including the JSON site, wikipedia, etc) correctly state that JSON is a subset of Javascript.</description>
		<content:encoded><![CDATA[<p>I just re-read ECMA 262 and RFC 4627 side by side, and the grammar specifications confirm that JSON is, in fact, a strict subset of Javascript (even down to the unicode and escape sequences they both accept in their strings).</p>
<p>RFC 4627 explicitly says this in its introduction, of course, but that is probably best treated as non-normative (4627 is not a specification, in any case). The detailed production rules confirm it though.</p>
<p>I came across your blog post because I had a client who insisted that JSON wasn&#8217;t a subset of Javascript, and hunting around the source of this urban myth seemed to be your blog. Most other sources (including the JSON site, wikipedia, etc) correctly state that JSON is a subset of Javascript.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian</title>
		<link>http://seattlesoftware.wordpress.com/2008/01/08/javascript-vs-json/#comment-123</link>
		<dc:creator>Ian</dc:creator>
		<pubDate>Wed, 23 Dec 2009 00:10:13 +0000</pubDate>
		<guid isPermaLink="false">http://seattlesoftware.wordpress.com/2008/01/08/javascript-compliant-json/#comment-123</guid>
		<description>Okay, (assuming your smart quotes are intended to be regular quotes) that&#039;s what I thought you were getting at.

In the context of something like:

var foo = {...};

your example is perfectly valid and legal Javascript, it conforms to the ECMA-262 (BNF in section 11.1.5), and it runs on the major JS platforms: I just tested in SpiderMonkey, Rhino, v8, and Futhark, all accept it fine and allow me to manipulate the elements in the object after initialization.</description>
		<content:encoded><![CDATA[<p>Okay, (assuming your smart quotes are intended to be regular quotes) that&#8217;s what I thought you were getting at.</p>
<p>In the context of something like:</p>
<p>var foo = {&#8230;};</p>
<p>your example is perfectly valid and legal Javascript, it conforms to the ECMA-262 (BNF in section 11.1.5), and it runs on the major JS platforms: I just tested in SpiderMonkey, Rhino, v8, and Futhark, all accept it fine and allow me to manipulate the elements in the object after initialization.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://seattlesoftware.wordpress.com/2008/01/08/javascript-vs-json/#comment-122</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 22 Dec 2009 23:47:06 +0000</pubDate>
		<guid isPermaLink="false">http://seattlesoftware.wordpress.com/2008/01/08/javascript-compliant-json/#comment-122</guid>
		<description>It doesn&#039;t sound like to me you actually read the post. Valid JSON that&#039;s not valid JavaScript is right there plain as day:

{ &quot;411&quot;: &quot;yohoho.com&quot;, &quot;xmlns:x&quot;: &quot;Invalid character&quot;, &quot;Company name&quot;: &quot;Spaces&quot;,&quot;&quot;: &quot;Zero-length string&quot; }\

Valid JSON. Invalid JavaScript.</description>
		<content:encoded><![CDATA[<p>It doesn&#8217;t sound like to me you actually read the post. Valid JSON that&#8217;s not valid JavaScript is right there plain as day:</p>
<p>{ &#8220;411&#8243;: &#8220;yohoho.com&#8221;, &#8220;xmlns:x&#8221;: &#8220;Invalid character&#8221;, &#8220;Company name&#8221;: &#8220;Spaces&#8221;,&#8221;": &#8220;Zero-length string&#8221; }\</p>
<p>Valid JSON. Invalid JavaScript.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian</title>
		<link>http://seattlesoftware.wordpress.com/2008/01/08/javascript-vs-json/#comment-121</link>
		<dc:creator>Ian</dc:creator>
		<pubDate>Mon, 21 Dec 2009 19:35:53 +0000</pubDate>
		<guid isPermaLink="false">http://seattlesoftware.wordpress.com/2008/01/08/javascript-compliant-json/#comment-121</guid>
		<description>Erm, I don&#039;t understand this post.

You know that Javascript allows quoted keys for its objects too, right? So this is fine in javascript:

var foo = {&quot;new&quot;:1, &quot;var&quot;: 2, &quot;break&quot;:3};

The only thing about this format is that you can&#039;t use Javascript&#039;s syntactic sugar of property access, but the Javascript is valid and you can still use it fine.  

RFC 4627 explicitly says property names in JSON must be strings. It also says that JSON is a subset of Javascript.

&quot;In fact, JSON objects can be invalid as JavaScript objects.&quot;

Can you give an example of a piece of valid JSON that wouldn&#039;t be valid Javascript?</description>
		<content:encoded><![CDATA[<p>Erm, I don&#8217;t understand this post.</p>
<p>You know that Javascript allows quoted keys for its objects too, right? So this is fine in javascript:</p>
<p>var foo = {&#8220;new&#8221;:1, &#8220;var&#8221;: 2, &#8220;break&#8221;:3};</p>
<p>The only thing about this format is that you can&#8217;t use Javascript&#8217;s syntactic sugar of property access, but the Javascript is valid and you can still use it fine.  </p>
<p>RFC 4627 explicitly says property names in JSON must be strings. It also says that JSON is a subset of Javascript.</p>
<p>&#8220;In fact, JSON objects can be invalid as JavaScript objects.&#8221;</p>
<p>Can you give an example of a piece of valid JSON that wouldn&#8217;t be valid Javascript?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A 1 minute overview of JSON &#171; Caffeine Induced</title>
		<link>http://seattlesoftware.wordpress.com/2008/01/08/javascript-vs-json/#comment-94</link>
		<dc:creator>A 1 minute overview of JSON &#171; Caffeine Induced</dc:creator>
		<pubDate>Sat, 04 Apr 2009 21:14:53 +0000</pubDate>
		<guid isPermaLink="false">http://seattlesoftware.wordpress.com/2008/01/08/javascript-compliant-json/#comment-94</guid>
		<description>[...] another link which also describes JSON in a concise form - and has a funny picture  Also, this post describes some of the exception cases where JSON is not actually legal JS (JS is a little more [...]</description>
		<content:encoded><![CDATA[<p>[...] another link which also describes JSON in a concise form &#8211; and has a funny picture  Also, this post describes some of the exception cases where JSON is not actually legal JS (JS is a little more [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
