#10019: Fix regression relative to 2.6: add newlines if indent=0

Patch by Amaury Forgeot d'Arc, updated by Sando Tosi.
This commit is contained in:
R David Murray 2011-04-12 21:02:45 -04:00
parent abdeeff3d1
commit 3dd02d62c9
4 changed files with 23 additions and 4 deletions

View file

@ -135,9 +135,9 @@ Basic Usage
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.
members will be pretty-printed with that indent level. An indent level of 0,
or negative, will only insert newlines. ``None`` (the default) selects the
most compact representation.
If *separators* is an ``(item_separator, dict_separator)`` tuple, then it
will be used instead of the default ``(', ', ': ')`` separators. ``(',',