title: Django: custom serialization options?
body: <p>I'm working on a Django-based web service and I'm trying to figure out what the best way to do my serialization will be.</p>
  
  <p>The tricky requirement, though, is that I'd like to have pretty much full control over format of, and fields contained in, the response.</p>
  
  <p>For example, the Django serializers (which, unfortunately, includes the <a href="http://wadofstuff.blogspot.com/2009/02/django-full-serializers-part-i.html" rel="nofollow noreferrer">wadofstuff serializer</a>) automatically wrap the fields in <code>{ model: "app.Model", pk: 42, fields: { ... }}</code>, which is great for creating fixtures, but isn't great for me — I'd like full control over the output.</p>
  
  <p>Additionally, I'd like a serializer that is aware of Django's objects so, for example, it will do the Right Thing with a <code>QuerySet</code> or <code>ManyToManyField</code>.</p>
  
  <p>Currently I'm thinking of using django-piston's <a href="http://bitbucket.org/jespern/django-piston/src/tip/piston/emitters.py" rel="nofollow noreferrer">emitters.py</a>, but my experience with django-piston has only been mediocreª, so I'd like to see if there are other options.</p>
  
  <p>So, are there any other options for customizable Django serializers?</p>
  
  <p>ª: It's sparsely documented and tested, and I've had some problems with the serializer.</p>