esnme/ultrajson — Issue #36: Feature request: Decimal support
Author: gsakkis
Created: 2012-02-28 15:48:07+00:00
State: open

Trying to encode a python Decimal raises OverflowError:

>>> import ujson
>>> from decimal import Decimal
>>> ujson.dumps(Decimal(1.2))
Traceback (most recent call last):
File "", line 1, in
OverflowError: Maximum recursion level reached

Would be great to add a "use_decimal=True" parameter as in simplejson 2.1+