title: Convert WSGIRequest to JSON
body: <p>While making a custom middleware for storing HTTP Requests in Django project i came across a trouble that WSGIRequest object is not JSON serializable. I'm trying to do it like this:</p>
  
  <pre><code>import json
  
  
  class StoringHttpRequestsMiddleware(object):
      def process_request(self, request):
          print('Request looks like this - ')
          print json.dumps(request, separators=(',',':'))
          return
  </code></pre>
  
  <p>Should i perform parsing by myself or there are some ways to do it?</p>
  
  <p>Thanks.</p>