util/json.lua
changeset 7238 ee1f7e1e548c
parent 6788 bf1f09a5bcf7
child 7262 d8300985f2bb
--- a/util/json.lua	Fri Mar 04 22:17:38 2016 +0000
+++ b/util/json.lua	Fri Mar 04 22:27:04 2016 +0000
@@ -145,7 +145,9 @@
 
 function simplesave(o, buffer)
 	local t = type(o);
-	if t == "number" then
+	if o == null then
+		t_insert(buffer, "null");
+	elseif t == "number" then
 		t_insert(buffer, tostring(o));
 	elseif t == "string" then
 		stringsave(o, buffer);