title: creating a json array in python
body: <p>I need to create a json array like <code>["a", "b", "c", "d"]</code></p>
  
  <p>I'm trying to create it as follows</p>
  
  <pre><code>import json
  
  with open('djs.json', 'w') as outfile:
      for dj in DJ.objects.all():
          json.dump(str(dj), outfile, separators=(',', ': '))
  </code></pre>
  
  <p>This creates something like <code>"a","b","c","d"</code></p>
  
  <p>What would be the correct way to do this?</p>