[Seaside] JSON serialization of dictionary broken in Seaside 3.1?

Mariano Martinez Peck marianopeck at gmail.com
Wed Oct 15 14:56:43 UTC 2014


Ok. I found the problem. For seaside 3.0.9 I was loading these:

spec
project: 'Seaside' with: [
spec
className: 'ConfigurationOfSeaside3';
*loads: #('Core' 'Javascript-Core' 'JQuery-Core');*
file: 'ConfigurationOfSeaside3';
repository: 'http://smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main
';
].

But for Seaside 3.1 it should have been:


spec
project: 'Seaside' with: [
spec
className: 'ConfigurationOfSeaside3';
*loads: #('Core' 'Zinc-Seaside' 'Javascript' 'JQuery' 'JSON');*
file: 'ConfigurationOfSeaside3';
repository: 'http://smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main
 ].


Basically....use the groups rather than individual packages. Clearly, I was
missing some package...

Thanks!


On Tue, Oct 14, 2014 at 4:48 PM, Mariano Martinez Peck <
marianopeck at gmail.com> wrote:

>
>
> On Tue, Oct 14, 2014 at 4:40 PM, Philippe Marschall <
> philippe.marschall at gmail.com> wrote:
>
>> On Tue, Oct 14, 2014 at 4:06 PM, Mariano Martinez Peck
>> <marianopeck at gmail.com> wrote:
>> > Hi guys, I am trying to migrate my app from Seaside 3.0.9 to seaside
>> 3.1.3
>> > and I am having a problem with JQAutocomplete. The problem is in
>> > #search:labels:callback:. Basically, I am not able to serialize via JSON
>> > what I was indeed able before. It seems the json serialization changed
>> in
>> > seaside 3.1 as I can read in the changelog. I have reproduced the
>> problem up
>> > to this snipet:
>> >
>> > | dict stream |
>> > dict := GRSmallDictionary new.
>> > dict at: 'label' put: 'NONE'.
>> > dict at: 'index'put: 1.
>> > stream := GRPharoUtf8CodecStream
>> > on: String new writeStream
>> > converter: UTF8TextConverter new.
>> > stream json: dict.
>> >
>> > Anyone has an insigh of which should be the correct solution?
>>
>> "Works for me" I get
>> {"label": "NONE", "index": 1}
>> what do you get?
>>
>>
> I get 'Override #jsonOn: to make the receiver serializeable as JSON'
>
>
>> Can you check #jsonOn: on Dictionary and GRSmallDictionary? It could
>> be a loading issue. The methods have been moved around to different
>> packages.
>>
>>
> Dictionary >> jsonOn: aRenderer
> aRenderer object: [
> self keysAndValuesDo: [ :key :value |
> aRenderer key: key value: value ] ]
>
> GRSmallDictionary >> jsonOn: aRenderer
> aRenderer object: [
> self keysAndValuesDo: [ :key :value |
> aRenderer key: key value: value ] ]
>
> See the attached screenshot. Maybe I can share a fueled out stack?
>
>
>
>> Cheers
>> Philippe
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>



-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20141015/429eb496/attachment.htm


More information about the seaside mailing list