The code below ends up printing failure.
try:
print request.raw_post_data
json_data = simplejson.loads(request.raw_post_data)
except:
print "failure"
The out put of the first print is
JSON: {"password":"wfbarks","email":"wfbarks","username":"wfbarks"}
Does anybody know what is wrong this this?
The
JSON:part is not valid JSON. Strip it beforeloads. The remainder (i.e.{"password":"wfbarks","email":"wfbarks","username":"wfbarks"}) should be valid JSON.