import json def json_loads_from_request(request): raw = request.body.s_iter.read(int(request.headers['Content-Length'])) return json.loads(raw)