You should  return a dictionary not a list.

rval = {'values': [1,2,4]}

On Sun, Dec 4, 2011 at 5:34 PM, Jonathan Vanasco <jonat...@findmeon.com>wrote:

> i'm using pyramid with akhet
>
> according to the docs, i should be able to do something like this:
>
>    @view_config(renderer='json')
>    def login_status(self):
>        rval= [1,2,4]
>        return rval
>
> That creates an error for me:
>    ValueError: Could not convert view return value "[1, 2, 4]" into a
> response object
>
> is there something in the akhet config that disabled the ability to
> handle json like the normal docs ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To post to this group, send email to pylons-discuss@googlegroups.com.
> To unsubscribe from this group, send email to
> pylons-discuss+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to