json.loads()
import jsond = json.loads(j)print d['glossary']['title']
When I started using json, I was confused and unable to figure it out for some time, but finally I got what I wantedHere is the simple solution
import jsonm = {'id': 2, 'name': 'hussain'}n = json.dumps(m)o = json.loads(n)print(o['id'], o['name'])
use simplejson or cjson for speedups
import simplejson as jsonjson.loads(obj)or cjson.decode(obj)