title: Is it necessary to close files after writing JSON data to them in Python
body: <p>If i use:</p>
  
  <pre><code>with open(Name, 'w') as outfile:
      json.dump(json_object, outfile)
  </code></pre>
  
  <p>is it necessary to use the file.close() method afterwards?</p>
  
  <p>In general cases like writing normal strings to files in python what is the consequence of not using the file.close() method?</p>