Ticket #3466: core.serializers.json.2.diff

File core.serializers.json.2.diff, 676 bytes (added by Chris Beaven, 18 years ago)
  • django/core/serializers/json.py

     
    1616    Convert a queryset to JSON.
    1717    """
    1818    def end_serialization(self):
    19         simplejson.dump(self.objects, self.stream, cls=DateTimeAwareJSONEncoder, **self.options)
     19        opts = self.options.copy()
     20        opts.pop('stream', None)
     21        opts.pop('fields', None)
     22        simplejson.dump(self.objects, self.stream, cls=DateTimeAwareJSONEncoder, **opts)
    2023       
    2124    def getvalue(self):
    2225        return self.stream.getvalue()
Back to Top