[web2py] Re: My hack to add JSON support to `request.vars`

2013-03-10 Thread Alan Etkin
> > Might be helpful to someone, also maybe we should implement it as > `request.vars.json`, like Python-Requests does? > web2py already supports json input by using the json fieldtype. The following line should add a textarea with json validation in sqlforms (and use native db json type when

[web2py] Re: My hack to add JSON support to `request.vars`

2013-03-10 Thread Niphlod
What's the usecase for this ? On Sunday, March 10, 2013 5:40:20 PM UTC+1, Alec Taylor wrote: > > Might be helpful to someone, also maybe we should implement it as > `request.vars.json`, like Python-Requests does? > > vars = request.vars > vars = str(vars) > vars = json.loads(vars[vars.find("{"