# HG changeset patch # User Matthew Wild # Date 1292642731 0 # Node ID f82af9f7f1cdd87caca70f97a41063fa3902648b # Parent 5cdcb5741075924a83c7a06adda662e9d4a0ab85 mod_storage_sql: Fix a couple of bugs in "JSON" decoding diff -r 5cdcb5741075 -r f82af9f7f1cd plugins/mod_storage_sql.lua --- 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