Skip to content

Commit

Permalink
bpo-34379: Doc: Move note for json.dump (pythonGH-8730)
Browse files Browse the repository at this point in the history
  • Loading branch information
eallrich authored and methane committed Aug 11, 2018
1 parent db6075a commit 9e84084
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Doc/library/json.rst
Expand Up @@ -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, \
Expand All @@ -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
Expand Down

0 comments on commit 9e84084

Please sign in to comment.