diff options
-rw-r--r-- | util/json.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/json.lua b/util/json.lua index becd295d..2c598446 100644 --- a/util/json.lua +++ b/util/json.lua @@ -145,7 +145,9 @@ end 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); |