diff options
author | Raymond Hettinger <python@rcn.com> | 2010-10-31 08:00:16 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2010-10-31 08:00:16 (GMT) |
commit | b643ef8f8e92728c2a4afaaa860592e384c7178c (patch) | |
tree | 213adcc2519d529203480cf3ec7809943f3e35dd /Doc | |
parent | 6ff2a7d12166c3e6c3418fa215ba27aa31981304 (diff) | |
download | cpython-b643ef8f8e92728c2a4afaaa860592e384c7178c.zip cpython-b643ef8f8e92728c2a4afaaa860592e384c7178c.tar.gz cpython-b643ef8f8e92728c2a4afaaa860592e384c7178c.tar.bz2 |
Issue #5729: json.dumps to support using '\t' as an indent string
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/json.rst | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/library/json.rst b/Doc/library/json.rst index a26001d..b0703a4 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -135,10 +135,12 @@ Basic Usage ``inf``, ``-inf``) in strict compliance of the JSON specification, instead of using the JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``). - 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`` (the default) selects the most compact - representation. + If *indent* is a non-negative integer or string, then JSON array elements and + object members will be pretty-printed with that indent level. An indent level + of 0 or ``""`` will only insert newlines. ``None`` (the default) selects the + most compact representation. Using an integer indent indents that many spaces + per level. If *indent* is a string (such at '\t'), that string is used to indent + each level. If *separators* is an ``(item_separator, dict_separator)`` tuple, then it will be used instead of the default ``(', ', ': ')`` separators. ``(',', |