On Sep 16, 2011, at 8:38 PM, dlypka wrote:
> I need something like
> @service.json(escape=false) in my service:
>
> @service.json
> def mytasks(a, b):
> R = '{"completed_in":0.163,"max_id":
> 112677442623246336,"max_id_str":"112677442623246336","next_page":"?
> page=2&max_id=112677442623246336&q=miami&...}]'
> return R
>
> The problem for me is that this is returning a string with \ infront
> of each double quote,
> which is not what I want.
>
> Any suggestions?
Looks to me like @service.json expects a Python object that it will encode as
JSON. So perhaps:
@service.json
def mytasks(a, b):
R = {"completed_in":0.163,"max_id":
112677442623246336,"max_id_str":"112677442623246336","next_page":"?
page=2&max_id=112677442623246336&q=miami&...}
return R