aboutsummaryrefslogtreecommitdiffstats
path: root/util/json.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-11-10 05:42:32 +0100
committerKim Alvefur <zash@zash.se>2017-11-10 05:42:32 +0100
commit1438a3884507b709cba08691d329b0cf137f4bd4 (patch)
tree9186c5db947b241b5590afab18bd6e720f95046a /util/json.lua
parent8962abd55b75a572b0e5821f11cd3342e09b113b (diff)
downloadprosody-1438a3884507b709cba08691d329b0cf137f4bd4.tar.gz
prosody-1438a3884507b709cba08691d329b0cf137f4bd4.zip
util: Various minor changes to please [luacheck]
Diffstat (limited to 'util/json.lua')
-rw-r--r--util/json.lua5
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;