Re: [web2py] Re: Web2py using json

2012-11-28 Thread Vinicius Assef
Pumplerod, json module is about pure Python. So, try this in your Python shell, to you see how json module works: import json s = json.dumps(dict(nome='john', age=25)) # this line converts a dictionary to a string print s, type(s) {age: 25, nome: john}, type 'str' d = json.loads(s) print

[web2py] Re: Web2py using json

2012-11-27 Thread pumplerod
Could you elaborate on how you accomplished this? I'm also trying to import a json object into my app and parse it. I'm not sure what that process entails. On Friday, July 13, 2012 1:34:41 AM UTC-7, Akash Kakkar wrote: Thanks Vinicius, Wish I had read your hint earlier, a GET did the

[web2py] Re: Web2py using json

2012-07-13 Thread Akash Kakkar
Thanks Vinicius, Wish I had read your hint earlier, a GET did the job for me, for a newbie GET and POST can be confusing. Infact a little description on GET / POST and when to use would have helped. On Saturday, 7 July 2012 11:17:32 UTC+5:30, Akash Kakkar wrote: Hi, I want to send

[web2py] Re: Web2py using json

2012-07-13 Thread howesc
for GET/POST/PUT/DELETE/HEAD etc description perhaps start with http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods :) On Friday, July 13, 2012 1:34:41 AM UTC-7, Akash Kakkar wrote: Thanks Vinicius, Wish I had read your hint earlier, a GET did the job for me, for a

[web2py] Re: Web2py using json

2012-07-08 Thread Massimo Di Pierro
def index(): from simplejson import loads, dumps data = loads(request.vars.myvar) return dumps(data) On Saturday, 7 July 2012 00:47:32 UTC-5, Akash Kakkar wrote: Hi, I want to send string content (html) from client to server using JSON and then decode the JSON to string in