title: JSON: TypeError: Decimal('34.3') is not JSON serializable
body: <p>I am running an SQL query which returns a list of Decimals. When I try to convert this into JSON i get the type error.</p>
  
  <p>The query:</p>
  
  <pre><code>res = db.execute("""
  SELECT CAST ((SUM(r.SalesVolume)/1000.0) AS decimal(6,1))
  FROM RawData r
  INNER JOIN Product p
  ON r.ProductId = p.ProductId 
  INNER JOIN Calendar c
  ON r.DayId = c.DayId
  WHERE c.WeekCodeInYear BETWEEN 1 AND 12
  AND 
  c.YearId = 2014
  GROUP BY c.WeekCodeInYear """)
  </code></pre>
  
  <p>Result List:</p>
  
  <pre><code>[Decimal('34.3'), Decimal('50.9'), Decimal('31.5'), Decimal('23.3'), Decimal('19
  .7'), Decimal('56.9'), Decimal('43.8'), Decimal('35.2'), Decimal('29.2'), Decima
  l('43.7'), Decimal('42.6'), Decimal('23.4')]
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>for row in res:
      testlist.append (row[0])
      print testlist
  
  list = json.dumps(testlist)
  </code></pre>
  
  <p>And the I get the <code>Unable to serialize error</code>
  Tried looking up online, no much help.
  Please note that the final list would go as input data to a chart.</p>