Skip to content

Commit 61097c4

Browse files
committed
Deprecate request.json property
1 parent 7169f44 commit 61097c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

flask/wrappers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ def json(self):
103103
104104
The :meth:`get_json` method should be used instead.
105105
"""
106-
# XXX: deprecate property
106+
from warnings import warn
107+
warn(DeprecationWarning('json is deprecated. '
108+
'Use get_json() instead.'), stacklevel=2)
107109
return self.get_json()
108110

109111
@property

0 commit comments

Comments
 (0)