title: How to output JSON from Python?
body: <p>Using <code>dict.toSource()</code> writing <code>dictVar</code> to an external python file:</p>
  
  <pre><code>var dictVar = {'one':'1','two':'2'};
  fileOut = new File('./out.py');    
  fileOut.open("w","TEXT","????");
  fileOut.write(dictVar.toSource());
  fileOut.close();
  </code></pre>
  
  <p>This results to a line in out.py:</p>
  
  <pre><code>({one:"1", two:"2"})
  </code></pre>
  
  <p>while expecting:</p>
  
  <pre><code>({'one':"1", 'two':"2"})
  </code></pre>
  
  <p>Question: Is there a way to write a dictionary where its key names are written to an output file as strings (such as <code>'one'</code> and <code>'two'</code> instead of <code>one</code> and <code>two</code>)? </p>