<?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: Conflating JSON with Javascript or why there is no &#8220;Safe JSON&#8221;</title>
	<atom:link href="http://robubu.com/?feed=rss2&#038;p=25" rel="self" type="application/rss+xml" />
	<link>http://robubu.com/?p=25</link>
	<description>the weblog of Rob Yates</description>
	<lastBuildDate>Sat, 14 Aug 2010 17:34:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Gastromancer</title>
		<link>http://robubu.com/?p=25&#038;cpage=1#comment-6987</link>
		<dc:creator>Gastromancer</dc:creator>
		<pubDate>Thu, 05 Apr 2007 01:11:33 +0000</pubDate>
		<guid isPermaLink="false">http://robubu.com/?p=25#comment-6987</guid>
		<description>Isn&#039;t the moral of this tale that &quot;eval is not a demarshaller&quot;?  I mean, c&#039;mon -- couldn&#039;t the Moz/IE/ECMAScript foks add a &quot;parse&quot; builtin function to the standard, that didn&#039;t eval?  Perhaps one that only accepted the constant-expression part of the Javascript grammar?</description>
		<content:encoded><![CDATA[<p>Isn&#8217;t the moral of this tale that &#8220;eval is not a demarshaller&#8221;?  I mean, c&#8217;mon &#8212; couldn&#8217;t the Moz/IE/ECMAScript foks add a &#8220;parse&#8221; builtin function to the standard, that didn&#8217;t eval?  Perhaps one that only accepted the constant-expression part of the Javascript grammar?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Hunlock</title>
		<link>http://robubu.com/?p=25&#038;cpage=1#comment-5156</link>
		<dc:creator>Patrick Hunlock</dc:creator>
		<pubDate>Sun, 11 Mar 2007 06:31:26 +0000</pubDate>
		<guid isPermaLink="false">http://robubu.com/?p=25#comment-5156</guid>
		<description>If you read John Resig&#039;s article &quot;Native JSON support is required&quot; ( http://ejohn.org/blog/native-json-support-is-required/ ) you&#039;ll see that we&#039;re just on the cusp of JSON being very mainstream.   The next generation of browsers will have cross-domain support for json and it&#039;s implied in the spec that the data will be processed by the browser and placed into a javascript object meaning you won&#039;t need to write a javascript serializer or pass the json data through eval (and we all know that i is masquerading as an a in that word).

So like it or hate it, json&#039;s position in web-applications is only going to get stronger over the coming year.  The standards are in place and the browsers are lining up to support it and I think in the end it will be a good thing, finally allowing data to be retrieved cross domain safely and securely for both the client and server.</description>
		<content:encoded><![CDATA[<p>If you read John Resig&#8217;s article &#8220;Native JSON support is required&#8221; ( <a href="http://ejohn.org/blog/native-json-support-is-required/" rel="nofollow">http://ejohn.org/blog/native-json-support-is-required/</a> ) you&#8217;ll see that we&#8217;re just on the cusp of JSON being very mainstream.   The next generation of browsers will have cross-domain support for json and it&#8217;s implied in the spec that the data will be processed by the browser and placed into a javascript object meaning you won&#8217;t need to write a javascript serializer or pass the json data through eval (and we all know that i is masquerading as an a in that word).</p>
<p>So like it or hate it, json&#8217;s position in web-applications is only going to get stronger over the coming year.  The standards are in place and the browsers are lining up to support it and I think in the end it will be a good thing, finally allowing data to be retrieved cross domain safely and securely for both the client and server.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lenny</title>
		<link>http://robubu.com/?p=25&#038;cpage=1#comment-5154</link>
		<dc:creator>Lenny</dc:creator>
		<pubDate>Sun, 11 Mar 2007 05:50:18 +0000</pubDate>
		<guid isPermaLink="false">http://robubu.com/?p=25#comment-5154</guid>
		<description>As I see it, the takeaway from all this is that the root of any private JSON document should be an Object, never an Array.

{...}, when not wrapped in parentheses, is interpreted as a code block rather than an object literal, so executing it will fail as a parse error. Wrapping in parentheses isn&#039;t valid JSON, anyway, so don&#039;t do it and you should be safe. Like you said, it&#039;s not a Javascript program.

[...], the other valid root, is a Javascript program, and is as vulnerable as ever.

Prescription: don&#039;t start your JSON doc with [, and don&#039;t deviate from the spec with things like parentheses.</description>
		<content:encoded><![CDATA[<p>As I see it, the takeaway from all this is that the root of any private JSON document should be an Object, never an Array.</p>
<p>{&#8230;}, when not wrapped in parentheses, is interpreted as a code block rather than an object literal, so executing it will fail as a parse error. Wrapping in parentheses isn&#8217;t valid JSON, anyway, so don&#8217;t do it and you should be safe. Like you said, it&#8217;s not a Javascript program.</p>
<p>[...], the other valid root, is a Javascript program, and is as vulnerable as ever.</p>
<p>Prescription: don&#8217;t start your JSON doc with [, and don&#8217;t deviate from the spec with things like parentheses.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Yates</title>
		<link>http://robubu.com/?p=25&#038;cpage=1#comment-5138</link>
		<dc:creator>Rob Yates</dc:creator>
		<pubDate>Sat, 10 Mar 2007 21:35:46 +0000</pubDate>
		<guid isPermaLink="false">http://robubu.com/?p=25#comment-5138</guid>
		<description>XML only for the first release, in the form of Atom Feeds and the Atom Publishing Protocol.</description>
		<content:encoded><![CDATA[<p>XML only for the first release, in the form of Atom Feeds and the Atom Publishing Protocol.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Mueller</title>
		<link>http://robubu.com/?p=25&#038;cpage=1#comment-5136</link>
		<dc:creator>Patrick Mueller</dc:creator>
		<pubDate>Sat, 10 Mar 2007 19:48:06 +0000</pubDate>
		<guid isPermaLink="false">http://robubu.com/?p=25#comment-5136</guid>
		<description>&quot;connections will NOT be offering a JSON api.&quot;  I assume you mean that JSON is not a data format that connections APIs will accept as input, or generate as output.  That&#039;s too bad.  XML only?  YAML, perhaps?</description>
		<content:encoded><![CDATA[<p>&#8220;connections will NOT be offering a JSON api.&#8221;  I assume you mean that JSON is not a data format that connections APIs will accept as input, or generate as output.  That&#8217;s too bad.  XML only?  YAML, perhaps?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
