aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-12-18 03:25:31 +0000
committerMatthew Wild <mwild1@gmail.com>2010-12-18 03:25:31 +0000
commitd44b3d481a2fc41fddc5b407ea08612333c1b6e5 (patch)
tree3a120cbfd41864317b4dfdf34c23a27ffa32d702 /plugins
parent389c66d8db41b3abcab10a3cffa5ee5963148192 (diff)
downloadprosody-d44b3d481a2fc41fddc5b407ea08612333c1b6e5.tar.gz
prosody-d44b3d481a2fc41fddc5b407ea08612333c1b6e5.zip
mod_storage_sql: Fix a couple of bugs in "JSON" decoding
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_storage_sql.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index e3eb3c77..3d5aa0a3 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -25,7 +25,7 @@ local tonumber = tonumber;
local pairs = pairs;
local next = next;
local setmetatable = setmetatable;
-local json = { stringify = function(s) return require"util.serialization".serialize(s) end, parse = require"util.serialization".deserialze };
+local json = { stringify = function(s) return require"util.serialization".serialize(s) end, parse = require"util.serialization".deserialize };
local connection = ...;
local host,user,store = module.host;
@@ -79,7 +79,7 @@ local function deserialize(t, value)
if value == "true" then return true;
elseif value == "false" then return false; end
elseif t == "number" then return tonumber(value);
- elseif value == "json" then
+ elseif t == "json" then
return json.parse(value);
end
end