#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

@ -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,