title: Convert Python None to JavaScript null
body: <p>In a Django view I am generating a data set something like this:</p>
  
  <pre><code>data = [22, 23, 18, 19, 21, None, 22, 20]
  </code></pre>
  
  <p>I am passing this data to a JavaScript variable using:</p>
  
  <pre><code>data_json = simplejson.dumps(data)
  </code></pre>
  
  <p>For use in a High Charts script.</p>
  
  <p>Unfortunately JavaScript is stumbling when it encounters the <code>None</code> value because actually what I need is <code>null</code>. How can I best replace <code>None</code> with <code>null</code>, and where should I handle this - in the Django View or in the JavaScript?</p>