<div class="gmail_quote"><div>Hi Bart,</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="gmail_quote"><div>I&#39;ve also noticed this. There is no implementation of jsonOn: aStream on Object class right now. <br>
Your implementation seems like a sensible default thing to do.</div>
<div>Its actually highly related to <a href="http://code.google.com/p/seaside/issues/detail?id=449" target="_blank">http://code.google.com/p/seaside/issues/detail?id=449</a> (<font face="arial, helvetica, sans-serif">Generating JSON is difficult</font>) bug.</div>
</div></div></blockquote><div><br></div><div>I&#39;ve just discovered that the code I posted previously for a default implementation of Object&gt;&gt;jsonOn: aStream suffered from a similar problem to the one&#39;s you&#39;ve found. Assuming your refactoring the last line should read: </div>
<div><br></div><div>    aStream json: <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(80, 0, 80); ">attributes</span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(80, 0, 80); "><br>
</span></div><div><font class="Apple-style-span" color="#500050" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: arial; "><div>
so the whole code reads: </div><div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(80, 0, 80); "><div>Object&gt;&gt;jsonOn: aStream</div>
<div><span style="white-space: pre; ">        </span>| attributes |</div><div><span style="white-space: pre; ">        </span>attributes := Dictionary new.</div><div><span style="white-space: pre; ">        </span>self class instVarNames do:</div>
<div><span style="white-space: pre; ">                </span>[ :ivarName | </div><div><span style="white-space: pre; ">                </span>attributes </div><div><span style="white-space: pre; ">                        </span>at: ivarName</div><div><span style="white-space: pre; ">                        </span>put: (self instVarNamed: ivarName) ].</div>
<div><span style="white-space: pre; ">        aStream json: attributes</span></div><div><span style="white-space: pre; "><br></span></div><div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: arial; white-space: normal; font-size: small; "><div>
perhaps this could be included with your changes? Comments?</div><div><br></div><div>Nick </div><div><br></div></span></span></div></span></div></span></span></font></div></div>