diff options
author | Kim Alvefur <zash@zash.se> | 2017-11-10 05:42:32 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-11-10 05:42:32 +0100 |
commit | 11b00845512b6af26000bd40dbf9f349f8886535 (patch) | |
tree | 9186c5db947b241b5590afab18bd6e720f95046a /util/json.lua | |
parent | 599acace643b98ea99f64b2544591e65caa9c533 (diff) | |
download | prosody-11b00845512b6af26000bd40dbf9f349f8886535.tar.gz prosody-11b00845512b6af26000bd40dbf9f349f8886535.zip |
util: Various minor changes to please [luacheck]
Diffstat (limited to 'util/json.lua')
-rw-r--r-- | util/json.lua | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/util/json.lua b/util/json.lua index cba54e8e..c88d4c09 100644 --- a/util/json.lua +++ b/util/json.lua @@ -27,9 +27,6 @@ module.null = null; local escapes = { ["\""] = "\\\"", ["\\"] = "\\\\", ["\b"] = "\\b", ["\f"] = "\\f", ["\n"] = "\\n", ["\r"] = "\\r", ["\t"] = "\\t"}; -local unescapes = { - ["\""] = "\"", ["\\"] = "\\", ["/"] = "/", - b = "\b", f = "\f", n = "\n", r = "\r", t = "\t"}; for i=0,31 do local ch = s_char(i); if not escapes[ch] then escapes[ch] = ("\\u%.4X"):format(i); end @@ -249,7 +246,7 @@ local function _readarray(json, index) end end local _unescape_error; -local function _unescape_surrogate_func(x) +local function _unescape_surrogate_func(x) -- luacheck: ignore local lead, trail = tonumber(x:sub(3, 6), 16), tonumber(x:sub(9, 12), 16); local codepoint = lead * 0x400 + trail - 0x35FDC00; local a = codepoint % 64; |