title: Error: Uncaught SyntaxError: Unexpected token &
body: <p>I get an error when sending JSON data to JavaScript from the models. It looks like encoding is causing the error, but all the examples I have found work for other people. How can I properly send model data from my view to JavaScript?</p>
  
  <p>view code:</p>
  
  <pre><code>def home(request):
    import json
    info_obj = Info.objects.all()
    json_data = serializers.serialize("json", info_obj)
    return render_to_response("pique/home.html", {'json_data':json_data}, context_instance=RequestContext(request))
  </code></pre>
  
  <p>JavaScript code:</p>
  
  <pre><code>var data = jQuery.parseJSON('{{json_data}}');
  console.log(data);
  </code></pre>
  
  <p>The error <code>Uncaught SyntaxError: Unexpected token &amp;</code>: </p>
  
  <pre><code>var data = jQuery.parseJSON('[{&amp;quot;pk&amp;quot;: 1, &amp;quot;model&amp;quot;: &amp;quot;pique.eat&amp;quot; ... 
  </code></pre>