@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
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.