title: Django: passing JSON from view to template
body: <p>In <code>views.py</code>, I have time series data stored in a dictionary as follows:</p>
  
  <pre><code>time_series = {"timestamp1": occurrences, "timestamp2": occurrences}
  </code></pre>
  
  <p>where each <code>timestamp</code> is in unix time and <code>occurrences</code> is an integer.</p>
  
  <p>Is there a way to pass the time series data as a json object in the context of the <code>render</code> function?</p>
  
  <p><strong>Why do this:</strong> I am using <a href="https://kamisama.github.io/cal-heatmap/" rel="noreferrer">Cal-heatmap</a> on the front end which requires the data to be in json format. Ajax requests work just fine for now but I ideally would like to use the <code>render</code> approach if possible.</p>