Software /
code /
prosody
Changeset
3891:f82af9f7f1cd
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 | 3890:5cdcb5741075 |
children | 3892:070d04b56a48 |
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