From c8d0f1b5128d13306bf2db147faaea120a53ae16 Mon Sep 17 00:00:00 2001 From: Mary Bucknell Date: Sun, 20 Oct 2019 21:40:27 -0500 Subject: [PATCH] The json_serial function needs to be provided in order to dump decimal.Decimal values correctly. (#280) --- pygeoapi/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygeoapi/api.py b/pygeoapi/api.py index 1915472..250e21e 100644 --- a/pygeoapi/api.py +++ b/pygeoapi/api.py @@ -997,7 +997,7 @@ def to_json(dict_): :returns: JSON string representation """ - return json.dumps(dict_) + return json.dumps(dict_, default=json_serial) def _render_j2_template(config, template, data):