title: POST json using Python: non-serializable error?
body: <p>Trying to post json to the specified URL using requests:</p>
  
  <pre><code>import requests, glob, unicodedata, ntpath, time, json
  
  url = 'https://myWebsite.com/ext/ext/ext'
  
  json_file = open("/Users/ME/Documents/folder/folder/test.json")
  
  headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
  
  r = requests.post(url, data=json.dumps(json_file), headers=headers)
  </code></pre>
  
  <p>This gives me the following error, however: </p>
  
  <pre><code>TypeError: &lt;open file '/Users/ME/Documents/folder/folder/test.json', mode 'r' at 0x1021c9660&gt; is not JSON serializable
  </code></pre>
  
  <p>What causes this error? I know my json file is valid json so I don't think that is the problem. </p>