From 99a859cca65b193e5755c8030695979466e6bd3d Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Sat, 30 Jan 2021 20:06:37 -0300 Subject: [PATCH 1/3] [DOC] Add link to jsonrpc.org --- Doc/library/json.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/json.rst b/Doc/library/json.rst index e1a246aad6190b..5a7fe47ab639cf 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -333,7 +333,7 @@ Encoders and Decoders *object_hook*, if specified, will be called with the result of every JSON object decoded and its return value will be used in place of the given :class:`dict`. This can be used to provide custom deserializations (e.g. to - support JSON-RPC class hinting). + support `JSON-RPC `_ class hinting). *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 From e1a0479559d55dfd856785314360e1942896ac60 Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Sat, 30 Jan 2021 20:42:22 -0300 Subject: [PATCH 2/3] [DOC] Improvement a text about TypeError in library/json --- Doc/library/json.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Doc/library/json.rst b/Doc/library/json.rst index 5a7fe47ab639cf..c5aadda8992ac4 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -422,10 +422,9 @@ Encoders and Decoders for ``o`` if possible, otherwise it should call the superclass implementation (to raise :exc:`TypeError`). - If *skipkeys* is false (the default), then it is a :exc:`TypeError` to - attempt encoding of keys that are not :class:`str`, :class:`int`, - :class:`float` or ``None``. If *skipkeys* is true, such items are simply - skipped. + If *skipkeys* is false (the default), a :exc:`TypeError` will be raised when + trying to encode keys that are not :class:`str`, :class:`int`, :class:`float` + or ``None``. If *skipkeys* is true, such items are simply skipped. If *ensure_ascii* is true (the default), the output is guaranteed to have all incoming non-ASCII characters escaped. If *ensure_ascii* is From c5fc6deb67f3dea8938b932b7956090d635a114c Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Sat, 30 Jan 2021 20:52:19 -0300 Subject: [PATCH 3/3] [DOC] Surround a method with :meth: in library/json --- Doc/library/json.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/json.rst b/Doc/library/json.rst index c5aadda8992ac4..c8184da80fe43e 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -478,8 +478,8 @@ Encoders and Decoders object for *o*, or calls the base implementation (to raise a :exc:`TypeError`). - For example, to support arbitrary iterators, you could implement default - like this:: + For example, to support arbitrary iterators, you could implement + :meth:`default` like this:: def default(self, o): try: