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

Nick Ager nick.ager at gmail.com
Mon Feb 1 12:20:53 UTC 2010

> Is the behaviour I'm experiencing a known issue? Or is there a reason it is
> designed this way? I've searched the mailing/bug list but could not find
> anything.
Hi Bart,
I've just come across the same issue with Json encoded arrays - but when I
searched I came across your helpful mail. Are you planning to submit your

On a related Json issue, I found that code I was writing for Json encoding
my classes followed a similar pattern - I'd encode all the instance
variables in a Dictionary. I extracted this code and made it generic as:

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

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.


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

More information about the seaside mailing list