Make JSON.stringify encode numbers properly

JSON doesn't allow scientific/exponential notation...

Fixes #14098
This commit is contained in:
Bjorn Neergaard
2015-12-27 15:19:24 -06:00
parent dd10637e08
commit f4600644ec
+1 -1
View File
@@ -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))