[Python-checkins] bpo-34379: Doc: Move note for json.dump (GH-8730)
Miss Islington (bot)
webhook-mailer at python.org
Sat Aug 11 04:02:11 EDT 2018
https://github.com/python/cpython/commit/6b145085225d4b114b4422f6d3c6e859e75b97d7
commit: 6b145085225d4b114b4422f6d3c6e859e75b97d7
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-08-11T01:02:03-07:00
summary:
bpo-34379: Doc: Move note for json.dump (GH-8730)
(cherry picked from commit 9e840848510d20e644a19c723b803877377d3765)
Co-authored-by: Evan Allrich <eallrich at gmail.com>
files:
M Doc/library/json.rst
diff --git a/Doc/library/json.rst b/Doc/library/json.rst
index d65fb3f1c33e..8ce493d63995 100644
--- a/Doc/library/json.rst
+++ b/Doc/library/json.rst
@@ -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
More information about the Python-checkins
mailing list