On Tue, Feb 28, 2012 at 11:41 PM, Rahul Rajan <[email protected]> wrote:
> To simplify it part a) of my previous email:
>
>> def tester(d):
>>   Window.alert("YAY")
>>     inst = 'yay'
>>     return inst
>
>
>> from json import loads
>>
>> bar = loads('["foo", {"bar":["baz", null, 1.0, 2]}]',
>> object_hook=tester) self.mainPanel.add(HTML(bar))
>
>
> On the browser:
>>
>> ['foo', {'bar': ['baz', None, 1, 2]}]
>
>
> It looks like loads works, but the object_hook parameter does not. I can see
> the tester function being mapped in the browser debugger. But I am not sure
> where it breaks. its kind of hard to follow whats going on. Just wondering
> if we are going down the right path here..

 1) make the full source code available so that we can see what's
really going on

 2) take a look at library/pyjamas/JSONService.browser.py and
library/pyjamas/JSONService.py

 object recreation is automatic, but you appear to be double-encoding the data.

 l.

Reply via email to