title: json.dump() changes the type from `dict` to `NoneType`
body: <p>I have a small python program that I use to manipulate JSON files. I find that when I dump the manipulated data back to the JSON file using json.dump() it changes to <code>&lt;type 'NoneType'&gt;</code>. The original type of the data below (type of <code>json_data</code>) is <code>&lt;type 'dict'&gt;</code>. I am storing these JSON documents in elasticsearch and visualising it using Kibana4.Kibana4 is treating newly added integer fields as string. Has someone come across this issue before.</p>
  
  <pre><code>import json                                                                                                                                                                                    
  
  fname = "json_data.txt"
  with open(fname, 'r+') as f:
      json_data = json.load(f)
      print(type(json_data))
      #Code to add fields to json files.   
      f.seek(0)
      x = json.dump(json_data,f,ensure_ascii=True)
      print(type(x))
  </code></pre>