Python 2.x's round() automatically converts Decimal types to a float. Python 3's round() returns a rounded Decimal object, leading to infinite recursion as EncodeDecimal is again called (it was passed to json.dumps as default) to convert the Decimal into a serializable type. Explicitly converting to a float will work for both python versions.
Fixes #54.
Python 2.x's round() automatically converts Decimal types to a float. Python 3's round() returns a rounded Decimal object, leading to infinite recursion as EncodeDecimal is again called (it was passed to json.dumps as default) to convert the Decimal into a serializable type. Explicitly converting to a float will work for both python versions.