aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/utils/encoders.py
diff options
context:
space:
mode:
Diffstat (limited to 'rest_framework/utils/encoders.py')
-rw-r--r--rest_framework/utils/encoders.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rest_framework/utils/encoders.py b/rest_framework/utils/encoders.py
index 6a2f6126..7992b6b1 100644
--- a/rest_framework/utils/encoders.py
+++ b/rest_framework/utils/encoders.py
@@ -43,7 +43,7 @@ class JSONEncoder(json.JSONEncoder):
elif isinstance(o, datetime.timedelta):
return str(o.total_seconds())
elif isinstance(o, decimal.Decimal):
- return str(o)
+ return float(o)
elif isinstance(o, QuerySet):
return list(o)
elif hasattr(o, 'tolist'):