]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-34379: Doc: Move note for json.dump (GH-8730)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 11 Aug 2018 09:13:04 +0000 (02:13 -0700)
committerINADA Naoki <methane@users.noreply.github.com>
Sat, 11 Aug 2018 09:13:04 +0000 (18:13 +0900)
(cherry picked from commit 9e840848510d20e644a19c723b803877377d3765)

Co-authored-by: Evan Allrich <eallrich@gmail.com>
Doc/library/json.rst

index d6dcd5209928650430247ceeac873df2de6142f8..aa9da91303086334a5ef948b435431b6a5cba22e 100644 (file)
@@ -188,6 +188,11 @@ Basic Usage
    .. versionchanged:: 3.6
       All optional parameters are now :ref:`keyword-only <keyword-only_parameter>`.
 
+   .. note::
+
+      Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol,
+      so trying to serialize multiple objects with repeated calls to
+      :func:`dump` using the same *fp* will result in an invalid JSON file.
 
 .. function:: dumps(obj, *, skipkeys=False, ensure_ascii=True, \
                     check_circular=True, allow_nan=True, cls=None, \
@@ -198,12 +203,6 @@ Basic Usage
    table <py-to-json-table>`.  The arguments have the same meaning as in
    :func:`dump`.
 
-   .. note::
-
-      Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol,
-      so trying to serialize multiple objects with repeated calls to
-      :func:`dump` using the same *fp* will result in an invalid JSON file.
-
    .. note::
 
       Keys in key/value pairs of JSON are always of the type :class:`str`. When