title: Django TypeError <Page 1 of 8> is not JSON serializable
body: <p>The error is occurred when I am trying to encode data into json. The error is due to pagination. I want json encoded data. </p>
  
  <p>Here's the code that I am using for fetching the results from db and then encoding it into json </p>
  
  <p>views.py</p>
  
  <pre><code>def pagination(obj, request):
      max = request.GET.get('max') if 'max' in request.GET else 1
      paginator = Paginator(obj, max)  # Show 25 contacts per page
      page = request.GET.get('page')
      try:
          return paginator.page(page)
      except PageNotAnInteger:
          # If page is not an integer, deliver first page.
          return paginator.page(1)
      except EmptyPage:
          return ""
  
  def folder_list(request):
      folders = UserFolder.objects.filter(creator=request.user).order_by('-modified_date')
      folders_dict = []
      for folder in folders:
          d = {}
          for k, v in folder.__dict__.items():
              d[k] = str(v)
          d["creator__first_name"] = folder.creator.first_name
          folders_dict.append(d)
      folders = Common.pagination(folders_dict, request)
      folders = json.dumps(folders)
      return HttpResponse(folders)
  </code></pre>
  
  <p>Any help would be really appreciated.</p>
  
  <p>Thanks</p>