title: Map object is not JSON serializable
body: <p>This happens when returning a <code>JSONResponse</code>, which was added in Django 1.7. and is a wrapper around <code>json.dumps</code>. However, in this case it results in an error. I'm sure the data is correct and can be serialized to JSON through Python shell.</p>
  
  <p>What is the right way to serialize the data to JSON?</p>
  
  <pre><code>from django.http import JsonResponse
  from collections import OrderedDict
  
  data = OrderedDict([('doc', '546546545'), ('order', '98745'), ('nothing', '0.0')])
  
  return JsonResponse(data) # doesn't work, JSONRenderer().render(data) works
  </code></pre>
  
  <p>Results in this error:</p>
  
  <pre><code>&lt;map object at 0x7fa3435f3048&gt; is not JSON serializable
  </code></pre>
  
  <p><code>print(data)</code> gives:</p>
  
  <p><code>OrderedDict([('doc', '546546545'), ('order', '98745'), ('nothing', '0.0')])</code></p>