I just render it by placing .json behind the url.
I have pretty much this:
http://www.web2py.com/book/default/chapter/10#parse_as_rest-(experimental)
It looks like I might use something like a custom_json property on table or
field, but I'm not sure. I also wonder how to use it then.
On Friday, June 14, 2013 12:40:32 PM UTC+2, R. Osinga wrote:
>
> Hi all,
>
> I'm creating a rest interface and I'd like to do something like:
>
> URL: /pets/default/api/pets
> RESULT: [
> {name: 'Ramo',
> animal: 'dog',
> owner: 'http://server:port/pets/default/api/owners/15'}
> ]
>
> but instead it keeps returning in the format of
> [
> {name: 'Ramo',
> animal: 'dog',
> owner: 15}
> ]
>
> I'm using the 'format' parameter on the field 'owner' of the table 'pet',
> but when rendering json, it doesn't seem to listen to it. Is it possible to
> do so? Am I doing something wrong?
>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.