aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2016-03-04 22:28:15 +0000
committerMatthew Wild <mwild1@gmail.com>2016-03-04 22:28:15 +0000
commit26aa750e1c62b7994e790073620bf1fed7af476b (patch)
tree3a2a3a3b984030b3f04665ea994437f9c09addf4 /util
parent1322d44e8dd886c16d3edf548af37c2e3d054480 (diff)
parent2d56536be48758e1332090eb6528f8a294887468 (diff)
downloadprosody-26aa750e1c62b7994e790073620bf1fed7af476b.tar.gz
prosody-26aa750e1c62b7994e790073620bf1fed7af476b.zip
Merge 0.10->trunk
Diffstat (limited to 'util')
-rw-r--r--util/json.lua4
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);