diff --git a/CHANGES.txt b/CHANGES.txt
index 3e28c9467467d5d4383315345b2410933eaaef51_Q0hBTkdFUy50eHQ=..97431ea8768e1177be925870411868e8ca0e607c_Q0hBTkdFUy50eHQ= 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,7 @@
 Version 2.1.2 released XXXX-XX-XX
 
+* Correct output for indent=0
+  http://bugs.python.org/issue10019
 * Correctly raise TypeError when non-string keys are used with speedups
   http://code.google.com/p/simplejson/issues/detail?id=82
 * Fix the endlineno, endcolno attributes of the JSONDecodeError exception.
diff --git a/simplejson/encoder.py b/simplejson/encoder.py
index 3e28c9467467d5d4383315345b2410933eaaef51_c2ltcGxlanNvbi9lbmNvZGVyLnB5..97431ea8768e1177be925870411868e8ca0e607c_c2ltcGxlanNvbi9lbmNvZGVyLnB5 100644
--- a/simplejson/encoder.py
+++ b/simplejson/encoder.py
@@ -147,7 +147,7 @@
         If encoding is not None, then all input strings will be
         transformed into unicode using that encoding prior to JSON-encoding.
         The default is UTF-8.
-        
+
         If use_decimal is true (not the default), ``decimal.Decimal`` will
         be supported directly by the encoder. For the inverse, decode JSON
         with ``parse_float=decimal.Decimal``.
@@ -268,7 +268,7 @@
 
         key_memo = {}
         if (_one_shot and c_make_encoder is not None
-                and not self.indent and not self.sort_keys):
+                and self.indent is None and not self.sort_keys):
             _iterencode = c_make_encoder(
                 markers, self.default, _encoder, self.indent,
                 self.key_separator, self.item_separator, self.sort_keys,
diff --git a/simplejson/tests/test_indent.py b/simplejson/tests/test_indent.py
index 3e28c9467467d5d4383315345b2410933eaaef51_c2ltcGxlanNvbi90ZXN0cy90ZXN0X2luZGVudC5weQ==..97431ea8768e1177be925870411868e8ca0e607c_c2ltcGxlanNvbi90ZXN0cy90ZXN0X2luZGVudC5weQ== 100644
--- a/simplejson/tests/test_indent.py
+++ b/simplejson/tests/test_indent.py
@@ -2,6 +2,7 @@
 
 import simplejson as json
 import textwrap
+from StringIO import StringIO
 
 class TestIndent(TestCase):
     def test_indent(self):
@@ -51,3 +52,18 @@
         #       so the following is expected to fail. Python 2.4 is not a
         #       supported platform in simplejson 2.1.0+.
         self.assertEquals(d2, expect)
+
+    def test_indent0(self):
+        h = {3: 1}
+        def check(indent, expected):
+            d1 = json.dumps(h, indent=indent)
+            self.assertEquals(d1, expected)
+
+            sio = StringIO()
+            json.dump(h, sio, indent=indent)
+            self.assertEquals(sio.getvalue(), expected)
+
+        # indent=0 should emit newlines
+        check(0, '{\n"3": 1\n}')
+        # indent=None is more compact
+        check(None, '{"3": 1}')