summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorINADA Naoki <methane@users.noreply.github.com>2018-04-03 03:39:47 (GMT)
committerGitHub <noreply@github.com>2018-04-03 03:39:47 (GMT)
commit629338f1404ea9cd75e4fb0389a2fbe1b589de43 (patch)
tree228b72a6402a785a70ceab1ba94049634e07ea38 /Doc
parentbadb894bbbb8aaa8b669c4a6f675a0bc7d98e188 (diff)
downloadcpython-629338f1404ea9cd75e4fb0389a2fbe1b589de43.zip
cpython-629338f1404ea9cd75e4fb0389a2fbe1b589de43.tar.gz
cpython-629338f1404ea9cd75e4fb0389a2fbe1b589de43.tar.bz2
bpo-32360: Remove object_pairs_hook=OrderedDict examples (GH-5001)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/json.rst12
1 files changed, 4 insertions, 8 deletions
diff --git a/Doc/library/json.rst b/Doc/library/json.rst
index 829218d..bcad61a 100644
--- a/Doc/library/json.rst
+++ b/Doc/library/json.rst
@@ -230,10 +230,8 @@ Basic Usage
*object_pairs_hook* is an optional function that will be called with the
result of any object literal decoded with an ordered list of pairs. The
return value of *object_pairs_hook* will be used instead of the
- :class:`dict`. This feature can be used to implement custom decoders that
- rely on the order that the key and value pairs are decoded (for example,
- :func:`collections.OrderedDict` will remember the order of insertion). If
- *object_hook* is also defined, the *object_pairs_hook* takes priority.
+ :class:`dict`. This feature can be used to implement custom decoders.
+ If *object_hook* is also defined, the *object_pairs_hook* takes priority.
.. versionchanged:: 3.1
Added support for *object_pairs_hook*.
@@ -325,10 +323,8 @@ Encoders and Decoders
*object_pairs_hook*, if specified will be called with the result of every
JSON object decoded with an ordered list of pairs. The return value of
*object_pairs_hook* will be used instead of the :class:`dict`. This
- feature can be used to implement custom decoders that rely on the order
- that the key and value pairs are decoded (for example,
- :func:`collections.OrderedDict` will remember the order of insertion). If
- *object_hook* is also defined, the *object_pairs_hook* takes priority.
+ feature can be used to implement custom decoders. If *object_hook* is also
+ defined, the *object_pairs_hook* takes priority.
.. versionchanged:: 3.1
Added support for *object_pairs_hook*.