Kevin Dangoor, el miƩrcoles 26 de octubre a las 08:35 me escribiste:
>
> On 10/26/05, Leandro Lucarella <[EMAIL PROTECTED]> wrote:
> > What about SelectResult? Maybe this could be done to jsonify it:
> >
> > def selectResult_to_list(select_result):
> > obj_list = []
> > for obj in select_result:
> > obj_list.append(obj_to_dict(obj))
> > return obj_list
>
> If memory serves, Ian's code didn't do SelectResults, but it would be
> nice if it did...
> (BTW, this can be reduced to:
>
> list(select_result)
>
> )
>
> Ian's jsonify uses generic functions, so it's easy to add rules for
> serializing all kinds of things.
I've saw the svn repository and jsonify.py allready have the
implementation for SelectResult and SQLObject, and a generic way to
jsonify any object that provides a __json__ method. Nice!
So if it's in jsonify.py, it's allready integrated in TG? Now you can
simply return a SelectResult and get the expected output when using
tg_format=json?
--
LUCA - Leandro Lucarella - JID: luca(en)lugmen.org.ar - Debian GNU/Linux
.------------------------------------------------------------------------,
\ GPG: 5F5A8D05 // F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05 /
'--------------------------------------------------------------------'
Y cuando llegamos a nuestro hogar ella saca de su bolsillo derecho un
casete de Ricardo Montaner y nos dice: "Ponelo! Ponelo!"; nos
desilusionamos un poco, pero a esa altura... Todo da igual.
-- Sidharta Kiwi