using simplejson.dumps to encode a dictionary to json
Aaron
aaron.jerling at gmail.com
Tue Mar 15 15:40:08 EDT 2011
Hi there,
I am attempting to use simplejson.dumps to convert a dictionary to a json encoded string.
For some reason this doesn't work - it would be awesome if someone could give me a clue as to why.
loginreq = {"username":username, "password":password, "productType":"CFD_Demo"}
authreq_data = {"req":loginreq}
authreq_data = simplejson.dumps(authreq_data)
A
#The dictionary contains a dictionary
More information about the Python-list
mailing list