[Seaside] Seaside Json serialization for Dictionary, Collection does not recursive jsonOn: aStream ?

Nick Ager nick.ager at gmail.com
Mon Feb 1 21:22:01 UTC 2010

Hi Bart,

> I've also noticed this. There is no implementation of jsonOn: aStream on
> Object class right now.
> Your implementation seems like a sensible default thing to do.
> Its actually highly related to
> http://code.google.com/p/seaside/issues/detail?id=449 (Generating JSON is
> difficult) bug.

I've just discovered that the code I posted previously for a default
implementation of Object>>jsonOn: aStream suffered from a similar problem to
the one's you've found. Assuming your refactoring the last line should

    aStream json: attributes

so the whole code reads:

Object>>jsonOn: aStream
| attributes |
attributes := Dictionary new.
self class instVarNames do:
[ :ivarName |
at: ivarName
put: (self instVarNamed: ivarName) ].
aStream json: attributes

perhaps this could be included with your changes? Comments?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100201/1d8e384e/attachment-0001.htm

More information about the seaside mailing list