From f5669fd7b568cf8a3eda1e65c1c6fb583c7b177d Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Mon, 12 Jul 2021 13:55:32 +0200 Subject: [PATCH] Fixed #32899 -- Added note about avoiding non-dict objects in JsonResponse docs. Co-authored-by: Mariusz Felisiak --- docs/ref/request-response.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt index a34880a4be6..747cb0ea6b2 100644 --- a/docs/ref/request-response.txt +++ b/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