I prefer Leandro's SO to dict/tuple/list as there is more than json and operate on these fundamental type in python is almost a must. Currently, I do it as json(dict(so)) or something like that.
Jeff Watkins wrote: > Since revision 89 or so, Ian's jsonify code has been included. You > can use code like the following: > > from turbogears.jsonify import * > > @turbogears.expose( format="json" ) > def method( self ): > return dict( stuff=jsonify(MyObject.get(1)) ) > > I'm planning to integrate this code in the regular JSON output > process (probably this weekend) so the jsonify call above wouldn't be > necessary. > > On 26 Oct, 2005, at 12:38 am, Leandro Lucarella wrote: > > > From Getting started: > > "SQLObject-based objects cannot yet be directly serialized as JSON. > > In the > > future, there will likely be a way to plug in your own code to take > > your > > objects and produce sane JSON versions of them." > > > > Is there any work done on that area? What about just converting > > SQLObject > > to a dict. Something like this would do the trick: > > > > -- > Jeff Watkins > http://metrocat.org/ > > Democracy n: A country where the newspapers are pro-American.

