summaryrefslogtreecommitdiff
path: root/simplejson/encoder.py
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2013-02-22 11:25:51 -0800
committerBob Ippolito <bob@redivi.com>2013-02-22 11:25:51 -0800
commitafa4fd25ca037c3ba4bb35aa99643715e1188ee0 (patch)
tree93c122e2516f0e496413786e355c4cf9d0aed26f /simplejson/encoder.py
parent062aa98fe19c9536b6ede4c0b84f5f3e6711b768 (diff)
downloadsimplejson-afa4fd25ca037c3ba4bb35aa99643715e1188ee0.tar.gz
Updated documentation to reflect separators behavior when indent is not None (#59)
Diffstat (limited to 'simplejson/encoder.py')
-rw-r--r--simplejson/encoder.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/simplejson/encoder.py b/simplejson/encoder.py
index db5c946..213fefb 100644
--- a/simplejson/encoder.py
+++ b/simplejson/encoder.py
@@ -153,9 +153,10 @@ class JSONEncoder(object):
versions of simplejson earlier than 2.1.0, an integer is also accepted
and is converted to a string with that many spaces.
- If specified, separators should be a (item_separator, key_separator)
- tuple. The default is (', ', ': '). To get the most compact JSON
- representation you should specify (',', ':') to eliminate whitespace.
+ If specified, separators should be an (item_separator, key_separator)
+ tuple. The default is (', ', ': ') if *indent* is ``None`` and
+ (',', ': ') otherwise. To get the most compact JSON representation,
+ you should specify (',', ':') to eliminate whitespace.
If specified, default is a function that gets called for objects
that can't otherwise be serialized. It should return a JSON encodable