Cleanup for the json property

This commit is contained in:
Armin Ronacher 2011-08-05 12:40:44 +02:00
parent afe5d3cbd4
commit a69b437af7

View file

@ -96,11 +96,8 @@ class Request(RequestBase):
if self.mimetype == 'application/json':
request_charset = self.mimetype_params.get('charset')
if request_charset is not None:
j = json.loads(self.data, encoding=request_charset )
else:
j = json.loads(self.data)
return j
return json.loads(self.data, encoding=request_charset)
return json.loads(self.data)
class Response(ResponseBase):