From a69b437af705dc8fa4e1b38b86ddad77d6dedb54 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Fri, 5 Aug 2011 12:40:44 +0200 Subject: [PATCH] Cleanup for the json property --- flask/wrappers.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/flask/wrappers.py b/flask/wrappers.py index 37d972d1..57c62ce1 100644 --- a/flask/wrappers.py +++ b/flask/wrappers.py @@ -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):