<?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"
	>
<channel>
	<title>Comments on: simplejson 1.1</title>
	<atom:link href="http://bob.pythonmac.org/archives/2005/12/31/simplejson-11/feed/" rel="self" type="application/rss+xml" />
	<link>http://bob.pythonmac.org/archives/2005/12/31/simplejson-11/</link>
	<description>Bob's Rants</description>
	<pubDate>Fri, 25 Jul 2008 15:53:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Clark Evans</title>
		<link>http://bob.pythonmac.org/archives/2005/12/31/simplejson-11/#comment-2812</link>
		<dc:creator>Clark Evans</dc:creator>
		<pubDate>Thu, 16 Feb 2006 17:37:21 +0000</pubDate>
		<guid isPermaLink="false">http://bob.pythonmac.org/archives/2005/12/31/simplejson-11/#comment-2812</guid>
		<description>I've got two requests.  First, could the decoder use a relative import -- the absolute import makes it hard to use simplejson as an external svn module.  Second, while it's not required by JSON, could you add an extra space after the colon?  I'd like to mix JSON and YAML, and this extra space is problematic; we're working on a YAML fix -- but it will take some time to coordinate.

Thanks!


Index: encoder.py
===================================================================
--- encoder.py  (revision 869)
+++ encoder.py  (working copy)
@@ -181,7 +181,7 @@
             else:
                 yield ', '
             yield encoder(key)
-            yield ':'
+            yield ': '
             for chunk in self._iterencode(value, markers):
                 yield chunk
         yield '}'
Index: decoder.py
===================================================================
--- decoder.py  (revision 869)
+++ decoder.py  (working copy)
@@ -3,7 +3,7 @@
 """
 import re

-from simplejson.scanner import Scanner, pattern
+from scanner import Scanner, pattern

 FLAGS = re.VERBOSE &#124; re.MULTILINE &#124; re.DOTALL</description>
		<content:encoded><![CDATA[<p>I&#8217;ve got two requests.  First, could the decoder use a relative import &#8212; the absolute import makes it hard to use simplejson as an external svn module.  Second, while it&#8217;s not required by JSON, could you add an extra space after the colon?  I&#8217;d like to mix JSON and YAML, and this extra space is problematic; we&#8217;re working on a YAML fix &#8212; but it will take some time to coordinate.</p>
<p>Thanks!</p>
<p>Index: encoder.py<br />
===================================================================<br />
&#8212; encoder.py  (revision 869)<br />
+++ encoder.py  (working copy)<br />
@@ -181,7 +181,7 @@<br />
             else:<br />
                 yield &#8216;, &#8216;<br />
             yield encoder(key)<br />
-            yield &#8216;:&#8217;<br />
+            yield &#8216;: &#8216;<br />
             for chunk in self._iterencode(value, markers):<br />
                 yield chunk<br />
         yield &#8216;}&#8217;<br />
Index: decoder.py<br />
===================================================================<br />
&#8212; decoder.py  (revision 869)<br />
+++ decoder.py  (working copy)<br />
@@ -3,7 +3,7 @@<br />
 &#8220;&#8221;"<br />
 import re</p>
<p>-from simplejson.scanner import Scanner, pattern<br />
+from scanner import Scanner, pattern</p>
<p> FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bob</title>
		<link>http://bob.pythonmac.org/archives/2005/12/31/simplejson-11/#comment-2800</link>
		<dc:creator>bob</dc:creator>
		<pubDate>Thu, 02 Feb 2006 07:23:41 +0000</pubDate>
		<guid isPermaLink="false">http://bob.pythonmac.org/archives/2005/12/31/simplejson-11/#comment-2800</guid>
		<description>simplejson returns JSON.  The way it "escapes backslashes" is part of the specification.  If it didn't return the data the way it does, then it wouldn't be a compliant JSON encoder.</description>
		<content:encoded><![CDATA[<p>simplejson returns JSON.  The way it &#8220;escapes backslashes&#8221; is part of the specification.  If it didn&#8217;t return the data the way it does, then it wouldn&#8217;t be a compliant JSON encoder.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit Upadhyay</title>
		<link>http://bob.pythonmac.org/archives/2005/12/31/simplejson-11/#comment-2799</link>
		<dc:creator>Amit Upadhyay</dc:creator>
		<pubDate>Thu, 02 Feb 2006 07:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://bob.pythonmac.org/archives/2005/12/31/simplejson-11/#comment-2799</guid>
		<description>I agree with Bob, they are not bugs in simplejson's implementation, just some gotchas on my side while using them with javascript. Things to note:
* if a string contains json encoded data, the right was to eval is: eval('('+json_str+')') and not eval(json_str) as I previously thought.
* simplejson escapes backslashes, while passing it around make sure this is preserved. 

Thanks for all the help!</description>
		<content:encoded><![CDATA[<p>I agree with Bob, they are not bugs in simplejson&#8217;s implementation, just some gotchas on my side while using them with javascript. Things to note:<br />
* if a string contains json encoded data, the right was to eval is: eval(&#8217;('+json_str+&#8217;)') and not eval(json_str) as I previously thought.<br />
* simplejson escapes backslashes, while passing it around make sure this is preserved. </p>
<p>Thanks for all the help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bob</title>
		<link>http://bob.pythonmac.org/archives/2005/12/31/simplejson-11/#comment-2798</link>
		<dc:creator>bob</dc:creator>
		<pubDate>Wed, 01 Feb 2006 22:21:39 +0000</pubDate>
		<guid isPermaLink="false">http://bob.pythonmac.org/archives/2005/12/31/simplejson-11/#comment-2798</guid>
		<description>simplejson does not have any bugs with regard to newlines.  The unit tests cover fully cover the JSON spec and it passes all of the JSON.org conformance tests.  This must be a problem in usage.</description>
		<content:encoded><![CDATA[<p>simplejson does not have any bugs with regard to newlines.  The unit tests cover fully cover the JSON spec and it passes all of the JSON.org conformance tests.  This must be a problem in usage.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit Upadhyay</title>
		<link>http://bob.pythonmac.org/archives/2005/12/31/simplejson-11/#comment-2797</link>
		<dc:creator>Amit Upadhyay</dc:creator>
		<pubDate>Wed, 01 Feb 2006 15:05:53 +0000</pubDate>
		<guid isPermaLink="false">http://bob.pythonmac.org/archives/2005/12/31/simplejson-11/#comment-2797</guid>
		<description>Hi,

Just wanted to let you know that I am using simplejson on www.labelr.com. 

There is a "bug": it does not encodes new lines. I try to eval json data returned from server, and I get javascript parsing error if data included new line anywhere, as its no longer a valid string. I don't know if its bug or intended behaviour, but if we could assume that json data can always be passed to eval without worries, it would be really cool. [right now i do a string replace for \n/\r=&#62; , which works out fine as I was anyways going to do it while converting it to html, but may not be acceptable otherwise.

Thanks for the cool library tho.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Just wanted to let you know that I am using simplejson on <a href="http://www.labelr.com" rel="nofollow">http://www.labelr.com</a>. </p>
<p>There is a &#8220;bug&#8221;: it does not encodes new lines. I try to eval json data returned from server, and I get javascript parsing error if data included new line anywhere, as its no longer a valid string. I don&#8217;t know if its bug or intended behaviour, but if we could assume that json data can always be passed to eval without worries, it would be really cool. [right now i do a string replace for \n/\r=&gt; , which works out fine as I was anyways going to do it while converting it to html, but may not be acceptable otherwise.</p>
<p>Thanks for the cool library tho.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
