On Tue, Jul 30, 2013 at 2:26 PM, Anthony <abasta...@gmail.com> wrote:

> @request.restful()
> def jsonlisttest():
>     response.view = 'generic.json'
>     def GET(*args, **vars):
>         sample_raw_rpc_response = '["one", "two", "three"]'
>         sample_rpc_response = simplejson.loads(sample_raw_rpc_response)
>         return sample_rpc_response
>
> Looks like you're starting with what is already JSON
> (sample_raw_rpc_response), then converting to a Python list (with
> simplejson.loads), and then wanting to send it to the generic.json view to
> be converted back to a JSON string. Why not just deliver the original
> string:
>
>     def GET(*args, **vars):
>         sample_raw_rpc_response = '["one", "two", "three"]'
>
>         return sample_raw_rpc_response
>
>
Because in between there is a whole lot of other processing.. I was just
trying to put together a small test case to show that returning a python
list caused a problem.

Matt


> Anthony
>
> --
>
> ---
> 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 web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to