title: django serializers to json - custom json output format
body: <p>I am quite new to django and recently I have a requirement of a JSON output, for which I use the following django code:</p>
  
  <pre><code>data = serializers.serialize("json", Mymodel.objects.all())
  </code></pre>
  
  <p>It works great, except that I get a output of:</p>
  
  <pre><code>[{"pk": 8970859016715811, "model": "myapp.mymodel", "fields": {"reviews": "3.5", "title": .....}}]
  </code></pre>
  
  <p>However, I would like the output to be simply either:</p>
  
  <pre><code>[{"reviews": "3.5", "title": .....}]
  </code></pre>
  
  <p>or,</p>
  
  <pre><code>[{"id": "8970859016715811", "reviews": "3.5", "title": .....}]
  </code></pre>
  
  <p>I was wondering if someone could point me to the right direction as to how to achieve this.</p>