projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d436173
)
util.json: Fix encoding of json.null (bug introduced in bf1f09a5bcf7)
author
Matthew Wild
<mwild1@gmail.com>
Fri, 4 Mar 2016 22:27:04 +0000
(22:27 +0000)
committer
Matthew Wild
<mwild1@gmail.com>
Fri, 4 Mar 2016 22:27:04 +0000
(22:27 +0000)
util/json.lua
patch
|
blob
|
history
diff --git
a/util/json.lua
b/util/json.lua
index becd295d55590e4757736c8a9cc1b4c16e7d834f..2c598446bab233d05825b7926bd21a7bd29d7b19 100644
(file)
--- 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);