Skip to content

Commit

Permalink
Fixed part of issue #290.
Browse files Browse the repository at this point in the history
  • Loading branch information
Poincare committed Aug 8, 2011
1 parent 505cd66 commit df10148
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flask/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def blueprint(self):
@cached_property
def json(self):
"""If the mimetype is `application/json` this will contain the
parsed JSON data.
parsed JSON data. Returns None if the the mimetype is incorrect.
"""
if __debug__:
_assert_have_json()
Expand All @@ -99,6 +99,8 @@ def json(self):
if request_charset is not None:
return json.loads(self.data, encoding=request_charset)
return json.loads(self.data)
else:
return None

def _load_form_data(self):
RequestBase._load_form_data(self)
Expand Down

0 comments on commit df10148

Please sign in to comment.