diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2023-07-29 05:48:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-29 05:48:10 (GMT) |
commit | f2d07d3289947d10b065b2bb7670c8fb6b6582f2 (patch) | |
tree | 4951b8b9118b548a868de6995c451aa33814dc1c /Doc/library/json.rst | |
parent | 413ba8943e2f1d896a0568eb571a041b88589440 (diff) | |
download | cpython-f2d07d3289947d10b065b2bb7670c8fb6b6582f2.zip cpython-f2d07d3289947d10b065b2bb7670c8fb6b6582f2.tar.gz cpython-f2d07d3289947d10b065b2bb7670c8fb6b6582f2.tar.bz2 |
gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386)
Diffstat (limited to 'Doc/library/json.rst')
-rw-r--r-- | Doc/library/json.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/json.rst b/Doc/library/json.rst index 35a0899..6c30593 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -192,7 +192,7 @@ Basic Usage dictionaries will be sorted by key. To use a custom :class:`JSONEncoder` subclass (e.g. one that overrides the - :meth:`default` method to serialize additional types), specify it with the + :meth:`~JSONEncoder.default` method to serialize additional types), specify it with the *cls* kwarg; otherwise :class:`JSONEncoder` is used. .. versionchanged:: 3.6 @@ -422,7 +422,7 @@ Encoders and Decoders Added support for int- and float-derived Enum classes. To extend this to recognize other objects, subclass and implement a - :meth:`default` method with another method that returns a serializable object + :meth:`~JSONEncoder.default` method with another method that returns a serializable object for ``o`` if possible, otherwise it should call the superclass implementation (to raise :exc:`TypeError`). @@ -483,7 +483,7 @@ Encoders and Decoders :exc:`TypeError`). For example, to support arbitrary iterators, you could implement - :meth:`default` like this:: + :meth:`~JSONEncoder.default` like this:: def default(self, o): try: |