Skip to content

Commit 9e84084

Browse files
eallrichmethane
authored andcommitted
bpo-34379: Doc: Move note for json.dump (GH-8730)
1 parent db6075a commit 9e84084

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Doc/library/json.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ Basic Usage
188188
.. versionchanged:: 3.6
189189
All optional parameters are now :ref:`keyword-only <keyword-only_parameter>`.
190190

191+
.. note::
192+
193+
Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol,
194+
so trying to serialize multiple objects with repeated calls to
195+
:func:`dump` using the same *fp* will result in an invalid JSON file.
191196

192197
.. function:: dumps(obj, *, skipkeys=False, ensure_ascii=True, \
193198
check_circular=True, allow_nan=True, cls=None, \
@@ -198,12 +203,6 @@ Basic Usage
198203
table <py-to-json-table>`. The arguments have the same meaning as in
199204
:func:`dump`.
200205

201-
.. note::
202-
203-
Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol,
204-
so trying to serialize multiple objects with repeated calls to
205-
:func:`dump` using the same *fp* will result in an invalid JSON file.
206-
207206
.. note::
208207

209208
Keys in key/value pairs of JSON are always of the type :class:`str`. When

0 commit comments

Comments
 (0)