Software /
code /
prosody
Comparison
plugins/mod_storage_sql.lua @ 8146:5c91fb62338e
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 17 May 2017 01:06:20 +0200 |
parent | 8083:32898a74b9d9 |
parent | 8138:cb605fb60e32 |
child | 8294:90576b60f2d0 |
comparison
equal
deleted
inserted
replaced
8133:102e1ec8bee1 | 8146:5c91fb62338e |
---|---|
31 return t, tostring(value); | 31 return t, tostring(value); |
32 elseif is_stanza(value) then | 32 elseif is_stanza(value) then |
33 return "xml", tostring(value); | 33 return "xml", tostring(value); |
34 elseif t == "table" then | 34 elseif t == "table" then |
35 local encoded,err = json.encode(value); | 35 local encoded,err = json.encode(value); |
36 if value then return "json", encoded; end | 36 if encoded then return "json", encoded; end |
37 return nil, err; | 37 return nil, err; |
38 end | 38 end |
39 return nil, "Unhandled value type: "..t; | 39 return nil, "Unhandled value type: "..t; |
40 end | 40 end |
41 local function deserialize(t, value) | 41 local function deserialize(t, value) |