Add fix to stringify decimals

THis is to fix the following error I was getting on trying to serialize decimals
```
  File "/usr/lib/python2.7/json/encoder.py", line 184, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: Decimal('3.52211579667') is not JSON serializable
```

I have modified the code using this fix: http://stackoverflow.com/questions/16957275/python-to-json-serialization-fails-on-decimal