mirror of
https://github.com/python/cpython.git
synced 2025-11-12 07:02:33 +00:00
bpo-34379: Doc: Move note for json.dump (GH-8730)
This commit is contained in:
parent
db6075ab3a
commit
9e84084851
1 changed files with 5 additions and 6 deletions
|
|
@ -188,6 +188,11 @@ Basic Usage
|
||||||
.. versionchanged:: 3.6
|
.. versionchanged:: 3.6
|
||||||
All optional parameters are now :ref:`keyword-only <keyword-only_parameter>`.
|
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, \
|
.. function:: dumps(obj, *, skipkeys=False, ensure_ascii=True, \
|
||||||
check_circular=True, allow_nan=True, cls=None, \
|
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
|
table <py-to-json-table>`. The arguments have the same meaning as in
|
||||||
:func:`dump`.
|
: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::
|
.. note::
|
||||||
|
|
||||||
Keys in key/value pairs of JSON are always of the type :class:`str`. When
|
Keys in key/value pairs of JSON are always of the type :class:`str`. When
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue