title: Dealing with Decimal to Json in requests library
body: <p>I'm trying to send post data to an api which needs to be in json.  If the requests header doesn't have <code>Content-type: application-json</code> the request fails and I get an <code>HTTPError: 415 Client Error: Unsupported Media Type for url</code></p>
  
  <p>However requests only seems to add in this header if I use the inbuilt json parser. Even though the docs seem to suggest the below is equivalent:</p>
  
  <pre><code>&gt;&gt;&gt; r = requests.post(url, data=json.dumps(payload))
  
  &gt;&gt;&gt; r = requests.post(url, json=payload)
  </code></pre>
  
  <p>Which means that I need to use the built in json parser (or manually add the Content-type header).</p>
  
  <p>However my post data has several Decimal fields (from api converted via <code>json.loads(response.text, parse_float=decimal.Decimal)</code> to be saved in a django DecimalField) which when using the inbuilt requests parser gives the error:</p>
  
  <pre><code>TypeError: Decimal('1560.35') is not JSON serialisable
  </code></pre>
  
  <p>Is there a way I can use a different json parser with requests (e.g. simplejson which deals with decimals) and have the content-type still specified. </p>