title: Using Django JSONField in model
body: <p>I am creating REST API's.</p>
  <pre><code>django==3.2.2
  djangorestframework==3.12.4
  psycopg2==2.8.6
  </code></pre>
  <p>I am new to Django, python.
  I looking for a way to use the JSON field in the Django model.
  My model looks like below -</p>
  <pre><code>class Question(BaseModel):
  .... other code...
      attributes = models.JSONField()
  </code></pre>
  <p>Now I want the attributes to be a JSON, like below</p>
  <pre><code>{
      &quot;index&quot;: 0,
      &quot;guid&quot;: &quot;95161b18-75a8-46bf-bb1f-6d1e16e3d60b&quot;,
      &quot;isActive&quot;: false,
      &quot;latitude&quot;: -25.191983,
      &quot;longitude&quot;: -123.930584,
      &quot;tags&quot;: [
        &quot;esse&quot;,
        &quot;sunt&quot;,
        &quot;quis&quot;
      ],
      &quot;friends&quot;: [
        {
          &quot;id&quot;: 0,
          &quot;name&quot;: &quot;Contreras Weeks&quot;
        },
        {
          &quot;id&quot;: 1,
          &quot;name&quot;: &quot;Dawn Lott&quot;
        }
      ]
  }
  </code></pre>
  <p>Should I create a new model, but creating a new model will make it add to migrations which I do not want.</p>
  <ol>
  <li>How to create a model for the above?</li>
  <li>How can I use the default validation provided by Django ORM on it?</li>
  </ol>