[issue16333] Trailing whitespace in json dump when using indent

2012-10-26 Thread Zach Mathew
New submission from Zach Mathew: When using the indent option in json.JSONEncoder, extra trailing whitespace (preceding the newline) is added to list and dict items. For example: >>> import json >>> json.dumps(['foo', 'bar'], indent=1) '[\n "fo

[issue16333] Trailing whitespace in json dump when using indent

2012-10-28 Thread Zach Mathew
Zach Mathew added the comment: To Ezio's first point ... yes, I was wondering if trailing whitespace should be left alone in the case of an explicitly defined separator. However, this behavior seems a little odd to me as I don't see a use case for it (happy to change the patch if