title: PySpark save DataFrame to actual JSON file
body: <p>How can I save a PySpark DataFrame to a real JSON file?</p>
  
  <p>Following documentation, I have tried </p>
  
  <pre><code>df.write.json('myfile.json')
  </code></pre>
  
  <p>It works, but it saves the file as a series of dictionaries, one per line and this does not get read properly by a</p>
  
  <pre><code>import json
  d = json.load(open('myfile.json'))
  </code></pre>
  
  <p>I would like the file to contain a list of dictionaries. Is there a way?</p>