try:
    import json
except ImportError:
    from django.utils import simplejson as json
    
from base import Serializer
    
class JSONSerializer(Serializer):

    def serialize(self):
        data = self.preprocess()

        return json.dumps(data)

try:
    import json
except ImportError:
    from django.utils import simplejson as json
    
from base import Serializer
    
class JSONSerializer(Serializer):

    def serialize(self):
        data = self.preprocess()

        return json.dumps(data, ensure_ascii=False)

Fix a bug that caused JSON to be serialized as a byte stream with unicode code points
Fix a bug that caused JSON to be serialized as a byte stream with unicode code points
