mirror of
https://github.com/python/cpython.git
synced 2026-06-18 15:42:21 +00:00
[3.13] gh-146061: Clarify indent=None in json docs (GH-146095) (GH-149669)
(cherry picked from commit 833dae7c1f)
Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
This commit is contained in:
parent
0478bd83d8
commit
a42082b6a1
2 changed files with 5 additions and 5 deletions
|
|
@ -214,7 +214,7 @@ Basic Usage
|
|||
a string (such as ``"\t"``) is used to indent each level.
|
||||
If zero, negative, or ``""`` (the empty string),
|
||||
only newlines are inserted.
|
||||
If ``None`` (the default), the most compact representation is used.
|
||||
If ``None`` (the default), no newlines are inserted.
|
||||
:type indent: int | str | None
|
||||
|
||||
:param separators:
|
||||
|
|
|
|||
|
|
@ -143,8 +143,8 @@ def dump(obj, fp, *, skipkeys=False, ensure_ascii=True, check_circular=True,
|
|||
|
||||
If ``indent`` is a non-negative integer, then JSON array elements and
|
||||
object members will be pretty-printed with that indent level. An indent
|
||||
level of 0 will only insert newlines. ``None`` is the most compact
|
||||
representation.
|
||||
level of 0 will only insert newlines. ``None`` is the default and gives
|
||||
a representation with no newlines inserted.
|
||||
|
||||
If specified, ``separators`` should be an ``(item_separator,
|
||||
key_separator)`` tuple. The default is ``(', ', ': ')`` if *indent* is
|
||||
|
|
@ -207,8 +207,8 @@ def dumps(obj, *, skipkeys=False, ensure_ascii=True, check_circular=True,
|
|||
|
||||
If ``indent`` is a non-negative integer, then JSON array elements and
|
||||
object members will be pretty-printed with that indent level. An indent
|
||||
level of 0 will only insert newlines. ``None`` is the most compact
|
||||
representation.
|
||||
level of 0 will only insert newlines. ``None`` is the default and gives
|
||||
a representation with no newlines inserted.
|
||||
|
||||
If specified, ``separators`` should be an ``(item_separator,
|
||||
key_separator)`` tuple. The default is ``(', ', ': ')`` if *indent* is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue