title: Converting only one entry of django model object to json
body: <p>I have a <strong>model Y</strong> with 3 fields. In this model Y, I have 5 entries.</p>
  
  <p>I know that I can use:</p>
  
  <pre><code>from django.core import serializers
  
  def aMethodThatReturnsJson():
      return HttpResponse(serializers.serialize("json", Y.objects.all()))
  </code></pre>
  
  <p>This returns a proper json response.</p>
  
  <p>But when I change the method to return only 1 row from the model, like below, I get Model Y is not iterable error:</p>
  
  <pre><code>def returnOnlyOneRow():
      return HttpResponse(serializers.serialize("json", Y.objects.get(pk=1)))
  </code></pre>
  
  <p>Why does this not return a proper json object? What is the correct way to do it?</p>
  
  <p>Thanks.</p>