diff options
author | Matthew Wild <mwild1@gmail.com> | 2016-03-04 22:27:04 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2016-03-04 22:27:04 +0000 |
commit | 2d56536be48758e1332090eb6528f8a294887468 (patch) | |
tree | c2a7bba22ba97919185210e5102bdc8d454b84a3 /util/json.lua | |
parent | c2762adde360fe71e4762734c48e9444d0765f94 (diff) | |
download | prosody-2d56536be48758e1332090eb6528f8a294887468.tar.gz prosody-2d56536be48758e1332090eb6528f8a294887468.zip |
util.json: Fix encoding of json.null (bug introduced in bf1f09a5bcf7)
Diffstat (limited to 'util/json.lua')
-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); |