Skip to content
Myr

Cleanup for the json property

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent afe5d3c · Browse files · 1 file+2 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−5 removed

  • other:+2 added−5 removed

1 file+2 added−5 removed

modified:flask/wrappers.py+2 added-5 removed
94 unmodified lines
95 _assert_have_json()96 if self.mimetype == 'application/json':97 request_charset = self.mimetype_params.get('charset')98 if request_charset is not None:99 j = json.loads(self.data, encoding=request_charset )100 else:101 j = json.loads(self.data)99 return json.loads(self.data, encoding=request_charset)100 return json.loads(self.data)101103 return j102105103class Response(ResponseBase):104 """The response object that is used by default in Flask. Works like the105 response object from Werkzeug but is set to have an HTML mimetype by106 default. Quite often you don't have to create this object yourself because
6 unmodified lines