The easies way is

from gluon.serializers import json

@auth.requires_login()
def f():
     return json(data)

or

@auth.requires_login()
def f():
     return dict(data=data)

and call it with http://.....json (int this second case you must
return a dict)


and call it with .json


On Feb 21, 5:14 pm, darkblue_b <[email protected]> wrote:
> Hi All- just stumbled upon web2py, glad to see it!
>
> I built a model that works for a client, and now simply want to return
> JSON *for a logged in user".. I am sure this is straightforward, but
> maybe someone could say it in a simple way..
>
> thanks in advance
>  -Brian

Reply via email to