title: d3.js not reading Python-generated JSON
body: <p>I'm using Python to scrape some data from the web before visualizing said data using d3.js. I'm having an issue reading the generated JSON in d3.js.</p>
  
  <p>Python code:</p>
  
  <pre><code>course_json_list = []
  obj = {u"course_id": course_id, u"prereqs": prereqs}
          course_json_list.append(json.dumps(obj, indent=4))
  
  
  # setting up JSON output file
  json_output = {"nodes": course_json_list,
                 "links": None}
  
  with open("course-data.json", "w") as outfile:
      json.dump(json_output, fp=outfile)
  </code></pre>
  
  <p>When I open this code in gVim, I see:
  <code>{"nodes": ["{\n    \"course_id\": \"Course 1\",\n    \"prereqs\": null,\n...</code></p>
  
  <p>My d3.js code:</p>
  
  <pre><code>var dataset;
  d3.json('course-data.json', function(error, json_data) {
      if (error) console.log(error);
      dataset = json_data;
      d3.select("body").selectAll("p")
              .data(dataset.nodes)
              .enter()
              .append("p")
              .text(function(d) {
              //When this is return d; it works
                  return d["course_id"];
      });
  });
  </code></pre>
  
  <p>I've put it into <a href="http://jsonlint.com/" rel="nofollow">JSONLint</a> and it returns: </p>
  
  <pre><code>{
      "nodes": [
          "{\n    \"course_id\": \"Course 1\", \n    \"prereqs\": null, \n    \"off_w\": null, \n    \"name\": \"Intro\"\n}",
          "{\n    \"course_id\": \"Course 2\", \n ...
  </code></pre>
  
  <p>JSONLint says the JSON is valid, but my d3.js code won't read it.
  Is my python generating bad JSON? If so, how do I generate it correctly? Am I referencing the JSON incorrectly in d3.js?</p>
  
  <p>Thanks</p>