title: Django send object as json
body: <p>Is there a way to send with json (or anything else other than render) an object_list made with paginator? The browser is making a getjson jquery request and the views.py function is supposed to return the object. The reason I want to return a json object rather than render a new page is because I don't want the page to reload</p>
  
  <p>The following views.py code:</p>
  
  <pre><code>searchresults = form.search()#this is a call to a haystack form template
  results = Paginator(searchresults, 20)
  page = results.page(1)
  return HttpResponse(json.dumps(page), content_type='application/json')
  </code></pre>
  
  <p>Gets this error:</p>
  
  <pre><code>TypeError: &lt;Page 1 of 1&gt; is not JSON serializable
  </code></pre>