From 040bfcc09c851bb3dadd60558c78a1f7937e9fbd Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Thu, 11 Sep 2014 21:48:54 +0100 Subject: NotImplemented stubs for Field, and DecimalField improvements --- rest_framework/utils/encoders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rest_framework/utils') 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'): -- cgit v1.2.3