On Tue, Feb 28, 2012 at 11:46 AM, Rahul Rajan <[email protected]> wrote:
> Hello,
>
> I am a newbie. I am having a lot of fun with pyjamas -- thanks for the
> awesome project :)

 :)

> I have a couple of questions:
> I am trying to send an object from the server to the client using JSON.

 then
> Server: json.dumps(tree, default=convert_to_builtin_type)
> Client: json.loads(response, object_hook=dict_to_object)
>
> But it looks like 'jsObjectToPyObject' in pyjs/json does not actually take
> in an object_hook argument? Is that right?

 it's automatic [in both pyjd and pyjs].  what you have to do is to
make sure that the classes exist and are imported into the
application.

 take a look at the dynamictable example.  pay attention to line 87 of
public/SchoolCalendarService.php and the fact that there exists a
module in the pyjs application named "Professor" with a class named
"Professor" in it.

l.

Reply via email to