Index: django/core/serializers/json.py
===================================================================
--- django/core/serializers/json.py	(revision 9404)
+++ django/core/serializers/json.py	(arbetskopia)
@@ -21,12 +21,34 @@
     """
     internal_use_only = False
 
+    def start_serialization(self): 
+        self._current = None 
+        self.json_kwargs = self.options.copy() 
+        self.json_kwargs.pop('stream', None) 
+        self.json_kwargs.pop('fields', None) 
+        self.stream.write("[")
+    
     def end_serialization(self):
-        self.options.pop('stream', None)
-        self.options.pop('fields', None)
-        simplejson.dump(self.objects, self.stream, cls=DjangoJSONEncoder, **self.options)
-
+         if self.options.get("indent"): 
+            self.stream.write("\n") 
+            self.stream.write("]") 
+            if self.options.get("indent"): 
+                self.stream.write("\n") 
+
+    def end_object(self, obj): 
+        # self._current has the field data 
+        if not self.first: 
+            self.stream.write(",") 
+        if not self.options.get("indent"): 
+            self.stream.write(" ") 
+        if self.options.get("indent"): 
+            self.stream.write("\n") 
+        simplejson.dump(self.get_dump_object(obj), self.stream, 
+                        cls=DjangoJSONEncoder, **self.json_kwargs) 
+        self._current = None 
+            
     def getvalue(self):
+        # overwrite PythonSerializer.getvalue() with base Serializer.getvalue() 
         if callable(getattr(self.stream, 'getvalue', None)):
             return self.stream.getvalue()
 
Index: django/core/serializers/base.py
===================================================================
--- django/core/serializers/base.py	(revision 9404)
+++ django/core/serializers/base.py	(arbetskopia)
@@ -37,6 +37,7 @@
         self.start_serialization()
         for obj in queryset:
             self.start_object(obj)
+            self.first = True 
             for field in obj._meta.local_fields:
                 if field.serialize:
                     if field.rel is None:
@@ -50,6 +51,8 @@
                     if self.selected_fields is None or field.attname in self.selected_fields:
                         self.handle_m2m_field(obj, field)
             self.end_object(obj)
+            if self.first: 
+                self.first = False 
         self.end_serialization()
         return self.getvalue()
 
Index: django/core/serializers/python.py
===================================================================
--- django/core/serializers/python.py	(revision 9404)
+++ django/core/serializers/python.py	(arbetskopia)
@@ -27,15 +27,19 @@
         self._current = {}
 
     def end_object(self, obj):
-        self.objects.append({
+        self.objects.append(self.get_dump_object(obj)) 
+        self._current = None 
+
+    def get_dump_object (self, obj): 
+        return {
             "model"  : smart_unicode(obj._meta),
             "pk"     : smart_unicode(obj._get_pk_val(), strings_only=True),
             "fields" : self._current
-        })
-        self._current = None
+        }
 
     def handle_field(self, obj, field):
-        self._current[field.name] = smart_unicode(getattr(obj, field.name), strings_only=True)
+        value = smart_unicode(getattr(obj, field.name), strings_only=True) 
+        self._current[field.name] = value 
 
     def handle_fk_field(self, obj, field):
         related = getattr(obj, field.name)
Index: django/core/management/commands/dumpdata.py
===================================================================
--- django/core/management/commands/dumpdata.py	(revision 9404)
+++ django/core/management/commands/dumpdata.py	(arbetskopia)
@@ -2,6 +2,7 @@
 from django.core import serializers
 
 from optparse import make_option
+import sys
 
 class Command(BaseCommand):
     option_list = BaseCommand.option_list + (
@@ -40,12 +41,13 @@
         except KeyError:
             raise CommandError("Unknown serialization format: %s" % format)
 
-        objects = []
-        for app in app_list:
-            for model in get_models(app):
-                objects.extend(model._default_manager.all())
+        def get_objects (): 
+            for app in app_list: 
+                for model in get_models(app): 
+                    for obj in model._default_manager.order_by(model._meta.pk.attname).iterator(): 
+                        yield obj
         try:
-            return serializers.serialize(format, objects, indent=indent)
+            serializers.serialize(format, get_objects(), indent=indent, stream=sys.stdout) 
         except Exception, e:
             if show_traceback:
                 raise
Index: tests/modeltests/fixtures/models.py
===================================================================
--- tests/modeltests/fixtures/models.py	(revision 9404)
+++ tests/modeltests/fixtures/models.py	(arbetskopia)
@@ -81,7 +81,7 @@
 
 # Dump the current contents of the database as a JSON fixture
 >>> management.call_command('dumpdata', 'fixtures', format='json')
-[{"pk": 3, "model": "fixtures.article", "fields": {"headline": "Time to reform copyright", "pub_date": "2006-06-16 13:00:00"}}, {"pk": 2, "model": "fixtures.article", "fields": {"headline": "Poker has no place on ESPN", "pub_date": "2006-06-16 12:00:00"}}, {"pk": 1, "model": "fixtures.article", "fields": {"headline": "Python program becomes self aware", "pub_date": "2006-06-16 11:00:00"}}]
+[{"pk": 1, "model": "fixtures.article", "fields": {"headline": "Python program becomes self aware", "pub_date": "2006-06-16 11:00:00"}}, {"pk": 2, "model": "fixtures.article", "fields": {"headline": "Poker has no place on ESPN", "pub_date": "2006-06-16 12:00:00"}}, {"pk": 3, "model": "fixtures.article", "fields": {"headline": "Time to reform copyright", "pub_date": "2006-06-16 13:00:00"}}]
 """
 
 from django.test import TestCase
