title: Why is data returned from django.contrib.postgres.fields.JSONField a string?
body: <p>Environment:</p>
  
  <ul>
  <li>Django 1.9.10</li>
  <li>psycopg2 2.6.2</li>
  <li>PostgreSQL 9.5.4 installed via Homebrew on macOS Sierra</li>
  <li>Python 3.5.2 installed via Homebrew</li>
  </ul>
  
  <p>Example model:</p>
  
  <pre><code>from django.db import models
  from django.contrib.postgres.fields import JSONField
  
  
  class Foo(models.Model):
      data = JSONField()
  </code></pre>
  
  <p>When I try to create an object, everything works as expected:</p>
  
  <pre><code>from myapp.models import Foo
  x = Foo()
  x.data = {'some key': 'some value'}
  x.save()
  </code></pre>
  
  <p>However, when I try to retrieve that data, the value of the <code>.data</code> attribute is a string:</p>
  
  <pre><code>from myapp.models import Foo
  x = Foo.objects.order_by('-id')[0]
  # returns "{'some key': 'some value'}"
  x.data
  # returns &lt;class 'str'&gt;
  type(x.data)
  </code></pre>
  
  <p>My question: how do I get back the <code>dict</code> so I can manipulate data within the JSON field?  </p>
  
  <p><strong>EDIT</strong>: Using <code>json.loads()</code> fails because the property names and values are enclosed in single quotes rather than double quotes:</p>
  
  <pre><code>import json
  json.loads(x.data)
  # JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
  </code></pre>
  
  <p>I can use <code>eval()</code>, but that's obviously extremely dangerous.</p>