1
0

don't use floats because of rounding errors

This commit is contained in:
ThomasV
2015-12-15 11:33:04 +01:00
parent 23868d5769
commit 679efe2a66
2 changed files with 6 additions and 5 deletions

View File

@@ -147,7 +147,7 @@ def json_encode(obj):
def json_decode(x):
try:
return json.loads(x)
return json.loads(x, parse_float=decimal.Decimal)
except:
return x