title: TypeError: Object of type Decimal is not JSON serializable
body: <h2><code>TypeError: Object of type Decimal is not JSON serializable</code></h2>
  <hr />
  <p>While I am running in <code>postman api</code> i get the above error because <code>sales_qty</code> is decimal , I dont know how to parse <code>decimal</code> in a <code>for</code> loop and return it as json</p>
  <pre class="lang-py prettyprint-override"><code>from flask import Flask, jsonify
  
  import decimal,json
  
  result= [('V_M_001', 'KITE', 'Napkin', 1, 2, 12, 0, Decimal('0'), Decimal('0'), Decimal('0'), Decimal('0')), 
          ('V_M_001', 'KITE', 'Napkin', 2, 4, 34, 5, Decimal('1'), Decimal('4'), Decimal('0'), Decimal('0'))]
          
  def fun():
  
     for i in result:
          data_all.append({
                              &quot;machine_name&quot;:i.machine_name,
                              &quot;location&quot;:i.location, 
                              &quot;item_name&quot;:i.item_name,
                              &quot;row_no&quot;:i.row_no,
                              &quot;require_minimum_stk_qty&quot;:i.require_minimum_stk_qty,
                              &quot;capacity&quot;:i.capacity,
                              &quot;stock_qty&quot;:i.stock_qty,
                              &quot;sales_qty&quot;:i.sales_qty,
                              &quot;available_qty&quot;:i.available_qty,
                              &quot;sales_day_qty&quot;:i.sales_day_qty,
                              &quot;sales_week_qty&quot;:i.sales_week_qty
          
          })
          
      return jsonify(data_all)
  
  fun()
  </code></pre>
  <p>Output:
  <code>TypeError: Object of type Decimal is not JSON serializable</code></p>