from tastypie.resources import ModelResource
from questions.models import Answer

class AnswerResource(ModelResource):
    class Meta:
        queryset = Answer.objects.all()
        allowed_methods = ['get']

@@ -1,12 +1,24 @@
+import json%0A
 from tastypi
@@ -85,16 +85,596 @@
 t Answer
+%0Afrom django.core.serializers.json import DjangoJSONEncoder%0Afrom tastypie.serializers import Serializer%0A%0A# From the Tastypie Cookbook: Pretty-printed JSON Serialization%0A# http://django-tastypie.readthedocs.org/en/latest/cookbook.html#pretty-printed-json-serialization%0Aclass PrettyJSONSerializer(Serializer):%0A    json_indent = 2%0A%0A    def to_json(self, data, options=None):%0A        options = options or %7B%7D%0A        data = self.to_simple(data, options)%0A        return json.dumps(data, cls=DjangoJSONEncoder,%0A                sort_keys=True, ensure_ascii=False, indent=self.json_indent)
 %0A%0Aclass 
@@ -760,16 +760,16 @@
 s.all()%0A
-
         
@@ -794,8 +794,52 @@
 %5B'get'%5D%0A
+        serializer = PrettyJSONSerializer()%0A

Switch to pretty printing JSON for the API.