Hi,<div><br></div><div>I will create a bug for it and I&#39;m more than happy to create fix it. </div><div><div>Can anyone please add me as a seaside developer on squeaksource. (user=bkbag). Thanks.</div><div><br></div></div>
<div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div>On a related Json issue, I found that code I was writing for Json encoding my classes followed a similar pattern - I&#39;d encode all the instance variables in a Dictionary. I extracted this code and made it generic as:</div>

<div><br></div><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">        </span>JSStream encodeDictionary: attributes on: aStream.</div>

<div><br></div><div>I wonder if this would be sufficiently generally applicable to appear in the default distribution? Classes can always override the default for custom Json encoding.</div><div><br></div><div>Thoughts?</div>

<div><br></div><font color="#888888"><div>Nick</div></font></div></blockquote><div><br></div><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">http://code.google.com/p/seaside/issues/detail?id=449</a> (<font class="Apple-style-span" face="arial, helvetica, sans-serif">Generating JSON is difficult</font>) bug.</div>
<div><br></div><div>Kind Regards,</div><div><br></div><div>Bart</div><div><br></div></div><br clear="all">-- <br>imagination is more important than knowledge - Albert Einstein<br>Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein<br>
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein<br>The true sign of intelligence is not knowledge but imagination. - Albert Einstein<br>However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill<br>
It&#39;s not enough that we do our best; sometimes we have to do what&#39;s required. - Sir Winston Churchill<br>
</div>