Software /
code /
prosody
Changeset
3772:e1f6fe098404
mod_storage_sql: Fix a couple of bugs in "JSON" decoding
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 18 Dec 2010 03:25:31 +0000 |
parents | 3771:428882c438bf |
children | 3773:2e15808243f3 |
files | plugins/mod_storage_sql.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_storage_sql.lua Sat Dec 18 02:33:47 2010 +0000 +++ b/plugins/mod_storage_sql.lua Sat Dec 18 03:25:31 2010 +0000 @@ -25,7 +25,7 @@ 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 @@ 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