The problem is that what you parse is not valid JSON, check the standard on <a href="http://json.org">json.org</a>.<br><br>Lukas<br><br>On Monday, 12 September 2011, Sebastian Sastre &lt;<a href="mailto:sebastian@flowingconcept.com">sebastian@flowingconcept.com</a>&gt; wrote:<br>
&gt; Maybe this is useful to someone:<br>&gt; Try this:<br>&gt; JSJsonParser parseStream: &#39;{lhs: &quot;1 Brazil real&quot;,rhs: &quot;0.592768 U.S. dollars&quot;,error: &quot;&quot;,icc: true}&#39; readStream<br>&gt; it can&#39;t parse that, so..<br>
&gt; ...patch it with this:<br>&gt; JSJsonParser#parseProperty<br>&gt; | name value |<br>&gt; name := self parsePropertyName.<br>&gt; value := self parseValue.<br>&gt; ^ self createProperty: name with: value.<br>&gt; JSJsonParser#parsePropertyName<br>
&gt; | result |<br>&gt; result := WriteStream on: String new.<br>&gt; [ stream atEnd or: [ stream peek = $: ] ] <br>&gt; whileFalse: [ result nextPut: self parseCharacter ].<br>&gt; ^ self expect: &#39;:&#39;; createString: result contents<br>
&gt; then you get it working like this:<br>&gt;  a Dictionary(&#39;error&#39;-&gt;&#39;&#39; &#39;icc&#39;-&gt;true &#39;lhs&#39;-&gt;&#39;1 Brazil real&#39; &#39;rhs&#39;-&gt;&#39;0.592768 U.S. dollars&#39; )<br>&gt; sebastian &lt;<a href="http://about.me/sebastianconcept">http://about.me/sebastianconcept</a>&gt;<br>
&gt; o/<br>&gt;<br>&gt;<br>&gt;<br><br>-- <br>Lukas Renggli<br><a href="http://www.lukas-renggli.ch">www.lukas-renggli.ch</a><br>