summaryrefslogtreecommitdiff
path: root/Lib/json/encoder.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-11-29 00:36:42 +0200
committerEzio Melotti <ezio.melotti@gmail.com>2012-11-29 00:36:42 +0200
commit57af3bf1586718b650333a6230e34c279d826f92 (patch)
treeb8de4c41abc22106a184ea1e9ae1a45ea0dcd439 /Lib/json/encoder.py
parenteff1738e011ad7eb4479485557095c4a197d48ff (diff)
parentd654dedbbb1116bfed989aafd2ee7a004828546b (diff)
downloadcpython-git-57af3bf1586718b650333a6230e34c279d826f92.tar.gz
#16333: merge with 3.2.
Diffstat (limited to 'Lib/json/encoder.py')
-rw-r--r--Lib/json/encoder.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/json/encoder.py b/Lib/json/encoder.py
index 75b7f494b3..e1ed21f6e7 100644
--- a/Lib/json/encoder.py
+++ b/Lib/json/encoder.py
@@ -125,7 +125,10 @@ class JSONEncoder(object):
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 is the most compact representation.
+ None is the most compact representation. Since the default
+ item separator is ', ', the output might include trailing
+ whitespace when indent is specified. You can use
+ separators=(',', ': ') to avoid this.
If specified, separators should be a (item_separator, key_separator)
tuple. The default is (', ', ': '). To get the most compact JSON