From f4600644ecbfd333995a1d43be06b5bcefce1e70 Mon Sep 17 00:00:00 2001 From: Bjorn Neergaard Date: Sun, 27 Dec 2015 15:19:24 -0600 Subject: [PATCH] Make JSON.stringify encode numbers properly JSON doesn't allow scientific/exponential notation... Fixes #14098 --- code/modules/json/json.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/json/json.dm b/code/modules/json/json.dm index d3b80d6792d..dc48926021c 100644 --- a/code/modules/json/json.dm +++ b/code/modules/json/json.dm @@ -12,7 +12,7 @@ /datum/jsonHelper/proc/WriteValue(list/json, value) . = json if(isnum(value)) - json += value // Consider num2text(value, 20) for maximum accuracy. + json += num2text(value, 20) else if(isnull(value)) json += "null" else if(istext(value))