From 61097c47a35ad8883c77fc49b93c1314f7819464 Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Wed, 15 Oct 2014 02:21:52 +0900 Subject: [PATCH] Deprecate request.json property --- flask/wrappers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flask/wrappers.py b/flask/wrappers.py index da9d2c78..81c39f18 100644 --- a/flask/wrappers.py +++ b/flask/wrappers.py @@ -103,7 +103,9 @@ class Request(RequestBase): The :meth:`get_json` method should be used instead. """ - # XXX: deprecate property + from warnings import warn + warn(DeprecationWarning('json is deprecated. ' + 'Use get_json() instead.'), stacklevel=2) return self.get_json() @property