Here is an example. I think this is a problem:
>>> from gluon.serializers import json
>>> json(decimal.Decimal(123.456))
'"123.4560000000000030695446184836328029632568359375"'
I think this is what a user would intend:
>>> json(float(decimal.Decimal(123.456)))
'123.456'
Suggestion:
elif isinstance(o, decimal.Decimal):
return str(o)
I suggest this would be better: return float(o)