Browse Source

Fixed #32899 -- Added note about avoiding non-dict objects in JsonResponse docs.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Hasan Ramezani 3 years ago
parent
commit
f5669fd7b5
1 changed files with 4 additions and 0 deletions
  1. 4 0
      docs/ref/request-response.txt

+ 4 - 0
docs/ref/request-response.txt

@@ -1092,6 +1092,10 @@ parameter to ``False``::
 
 Without passing ``safe=False``, a :exc:`TypeError` will be raised.
 
+Note that an API based on ``dict`` objects is more extensible, flexible, and
+makes it easier to maintain forwards compatibility. Therefore, you should avoid
+using non-dict objects in JSON-encoded response.
+
 .. warning::
 
     Before the `5th edition of ECMAScript