<?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: JSON Parsing and Stringifying in jQuery (as a plugin)</title>
	<atom:link href="http://furrybrains.com/2009/01/15/json-parsing-and-stringifying-in-jquery-as-a-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://furrybrains.com/2009/01/15/json-parsing-and-stringifying-in-jquery-as-a-plugin/</link>
	<description>The Furry Brains blog tackles a wide range of issues related to web development and design.</description>
	<lastBuildDate>Wed, 18 Aug 2010 12:46:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: {}</title>
		<link>http://furrybrains.com/2009/01/15/json-parsing-and-stringifying-in-jquery-as-a-plugin/comment-page-1/#comment-33</link>
		<dc:creator>{}</dc:creator>
		<pubDate>Tue, 17 Aug 2010 11:25:12 +0000</pubDate>
		<guid isPermaLink="false">http://furrybrains.com/?p=117#comment-33</guid>
		<description>this.JSON = {};</description>
		<content:encoded><![CDATA[<p>this.JSON = {};</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mathias</title>
		<link>http://furrybrains.com/2009/01/15/json-parsing-and-stringifying-in-jquery-as-a-plugin/comment-page-1/#comment-30</link>
		<dc:creator>Mathias</dc:creator>
		<pubDate>Wed, 26 May 2010 20:41:28 +0000</pubDate>
		<guid isPermaLink="false">http://furrybrains.com/?p=117#comment-30</guid>
		<description>I replaced the
if (!this.JSON) {
  var JSON = {};
}

to 
if (!JSON) {
  var JSON = {};
}

and worked!</description>
		<content:encoded><![CDATA[<p>I replaced the<br />
if (!this.JSON) {<br />
  var JSON = {};<br />
}</p>
<p>to<br />
if (!JSON) {<br />
  var JSON = {};<br />
}</p>
<p>and worked!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Riley</title>
		<link>http://furrybrains.com/2009/01/15/json-parsing-and-stringifying-in-jquery-as-a-plugin/comment-page-1/#comment-27</link>
		<dc:creator>Kevin Riley</dc:creator>
		<pubDate>Thu, 10 Dec 2009 21:27:21 +0000</pubDate>
		<guid isPermaLink="false">http://furrybrains.com/?p=117#comment-27</guid>
		<description>Just want to say thanks for posting this. Helps tremendously!</description>
		<content:encoded><![CDATA[<p>Just want to say thanks for posting this. Helps tremendously!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Heessels</title>
		<link>http://furrybrains.com/2009/01/15/json-parsing-and-stringifying-in-jquery-as-a-plugin/comment-page-1/#comment-26</link>
		<dc:creator>Robert Heessels</dc:creator>
		<pubDate>Wed, 14 Oct 2009 08:32:48 +0000</pubDate>
		<guid isPermaLink="false">http://furrybrains.com/?p=117#comment-26</guid>
		<description>Got it working in Firefox (3.5.x) by changing
var JSON = {};
into:
this.JSON = {};</description>
		<content:encoded><![CDATA[<p>Got it working in Firefox (3.5.x) by changing<br />
var JSON = {};<br />
into:<br />
this.JSON = {};</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blackymetal</title>
		<link>http://furrybrains.com/2009/01/15/json-parsing-and-stringifying-in-jquery-as-a-plugin/comment-page-1/#comment-23</link>
		<dc:creator>Blackymetal</dc:creator>
		<pubDate>Fri, 18 Sep 2009 01:57:38 +0000</pubDate>
		<guid isPermaLink="false">http://furrybrains.com/?p=117#comment-23</guid>
		<description>The same issue reported by geoff smith,

JSON is undefined
if (typeof JSON.stringify !== &#039;function&#039;) {</description>
		<content:encoded><![CDATA[<p>The same issue reported by geoff smith,</p>
<p>JSON is undefined<br />
if (typeof JSON.stringify !== &#8216;function&#8217;) {</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: geoff smith</title>
		<link>http://furrybrains.com/2009/01/15/json-parsing-and-stringifying-in-jquery-as-a-plugin/comment-page-1/#comment-21</link>
		<dc:creator>geoff smith</dc:creator>
		<pubDate>Fri, 28 Aug 2009 00:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://furrybrains.com/?p=117#comment-21</guid>
		<description>Having trouble with this library in the latest FireFox (3.5.2). The variable JSON is undefined. Anyone see this?</description>
		<content:encoded><![CDATA[<p>Having trouble with this library in the latest FireFox (3.5.2). The variable JSON is undefined. Anyone see this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Dalton</title>
		<link>http://furrybrains.com/2009/01/15/json-parsing-and-stringifying-in-jquery-as-a-plugin/comment-page-1/#comment-10</link>
		<dc:creator>Jim Dalton</dc:creator>
		<pubDate>Mon, 02 Feb 2009 20:11:22 +0000</pubDate>
		<guid isPermaLink="false">http://furrybrains.com/?p=117#comment-10</guid>
		<description>I see, I assume &quot;line 157&quot; refers to line 3 of the actual plugin code? Or is it someplace else in your application code?

So I think I can guess at what is going on, which is that the variable JSON must already be defined in the scope somehow. If a variable is defined already within the scope, I believe it would throw an error if you tried to redeclare it with var. When you remove the var, you&#039;re probably just setting the variable that has been already defined elsewhere.

This was actually the *one* place in the code that I did touch, because in the original code for this function JSON was defined as a global variable. I added the var to give JSON local scope.

Looking at it closer though, it appears that the conditional logic surrounding the declaration is probably no longer relevant....i.e. it should just say &lt;code&gt;var JSON = {};&lt;/code&gt; and the &lt;code&gt;if (!this.JSON)&lt;/code&gt; condition can be safely removed.

If it&#039;s still not working after you do that, check the other JS you&#039;re using. Are you declaring JSON elsewhere as a global variable? If so, maybe rename the global variable or give it local scope.

Let me know the outcome...I think the plugin code should probably be amended assuming that works.</description>
		<content:encoded><![CDATA[<p>I see, I assume &#8220;line 157&#8243; refers to line 3 of the actual plugin code? Or is it someplace else in your application code?</p>
<p>So I think I can guess at what is going on, which is that the variable JSON must already be defined in the scope somehow. If a variable is defined already within the scope, I believe it would throw an error if you tried to redeclare it with var. When you remove the var, you&#8217;re probably just setting the variable that has been already defined elsewhere.</p>
<p>This was actually the *one* place in the code that I did touch, because in the original code for this function JSON was defined as a global variable. I added the var to give JSON local scope.</p>
<p>Looking at it closer though, it appears that the conditional logic surrounding the declaration is probably no longer relevant&#8230;.i.e. it should just say <code>var JSON = {};</code> and the <code>if (!this.JSON)</code> condition can be safely removed.</p>
<p>If it&#8217;s still not working after you do that, check the other JS you&#8217;re using. Are you declaring JSON elsewhere as a global variable? If so, maybe rename the global variable or give it local scope.</p>
<p>Let me know the outcome&#8230;I think the plugin code should probably be amended assuming that works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://furrybrains.com/2009/01/15/json-parsing-and-stringifying-in-jquery-as-a-plugin/comment-page-1/#comment-9</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Mon, 02 Feb 2009 19:53:26 +0000</pubDate>
		<guid isPermaLink="false">http://furrybrains.com/?p=117#comment-9</guid>
		<description>Hi,
Actually if narrowed it down to defining:
var JSON = []; // @line 157
If I take the &#039;var&#039; off it works in IE.
Please note I&#039;m in IE 8, but I also tried compatibility mode.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Actually if narrowed it down to defining:<br />
var JSON = []; // @line 157<br />
If I take the &#8216;var&#8217; off it works in IE.<br />
Please note I&#8217;m in IE 8, but I also tried compatibility mode.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Dalton</title>
		<link>http://furrybrains.com/2009/01/15/json-parsing-and-stringifying-in-jquery-as-a-plugin/comment-page-1/#comment-8</link>
		<dc:creator>Jim Dalton</dc:creator>
		<pubDate>Mon, 02 Feb 2009 18:47:24 +0000</pubDate>
		<guid isPermaLink="false">http://furrybrains.com/?p=117#comment-8</guid>
		<description>Thanks Mark. If it does end up being a bug in the code here, please do let me know. Like I said, I literally wrapped the code from JSON.org without touching it, so I&#039;m hoping it&#039;s unlikely there&#039;s a bug in the code here.</description>
		<content:encoded><![CDATA[<p>Thanks Mark. If it does end up being a bug in the code here, please do let me know. Like I said, I literally wrapped the code from JSON.org without touching it, so I&#8217;m hoping it&#8217;s unlikely there&#8217;s a bug in the code here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://furrybrains.com/2009/01/15/json-parsing-and-stringifying-in-jquery-as-a-plugin/comment-page-1/#comment-7</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Mon, 02 Feb 2009 18:00:59 +0000</pubDate>
		<guid isPermaLink="false">http://furrybrains.com/?p=117#comment-7</guid>
		<description>Looks like its the xmlObjectifier from teracoder.  I&#039;ll go back up that tree.

Thanks</description>
		<content:encoded><![CDATA[<p>Looks like its the xmlObjectifier from teracoder.  I&#8217;ll go back up that tree.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
