title: Decimal to JSON
body: <p>I'm pulling a sum from a DB which is a decimal value.
  I'm trying to use that value in a JSON result</p>
  
  <pre><code>json.dumps( { 'sum': amount } ) #where amount is my Decimal
  </code></pre>
  
  <p>Django can't serialize the <code>Decimal</code>.
  I can convert it to a string, but I'd like a numeric type within the JSON.
  If I try and convert it to a <code>float</code> I end up with more than 2 decimal places.</p>
  
  <p>What needs to happen, if possible, to get a result like the following?</p>
  
  <pre><code>{ 'sum': 500.50 }
  </code></pre>