mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
#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:
parent
abdeeff3d1
commit
3dd02d62c9
4 changed files with 23 additions and 4 deletions
|
@ -233,7 +233,7 @@ class JSONEncoder(object):
|
|||
|
||||
|
||||
if (_one_shot and c_make_encoder is not None
|
||||
and not self.indent):
|
||||
and self.indent is None):
|
||||
_iterencode = c_make_encoder(
|
||||
markers, self.default, _encoder, self.indent,
|
||||
self.key_separator, self.item_separator, self.sort_keys,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue