|
@@ -16,6 +16,7 @@
|
|
|
# limitations under the License.
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
import datetime
|
|
import datetime
|
|
|
|
|
+import decimal
|
|
|
import json
|
|
import json
|
|
|
import logging
|
|
import logging
|
|
|
|
|
|
|
@@ -46,6 +47,8 @@ class ResultEncoder(json.JSONEncoder):
|
|
|
return obj.strftime('%Y-%m-%d %H:%M:%S %Z')
|
|
return obj.strftime('%Y-%m-%d %H:%M:%S %Z')
|
|
|
elif isinstance(obj, datetime.date):
|
|
elif isinstance(obj, datetime.date):
|
|
|
return obj.strftime('%Y-%m-%d %Z')
|
|
return obj.strftime('%Y-%m-%d %Z')
|
|
|
|
|
+ elif isinstance(obj, decimal.Decimal):
|
|
|
|
|
+ return float(obj)
|
|
|
return super(ResultEncoder, self).default(obj)
|
|
return super(ResultEncoder, self).default(obj)
|
|
|
|
|
|
|
|
|
|
|