From 12103d9638aa74790c4f1d90a4cd0c252204850d Mon Sep 17 00:00:00 2001
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 18 Jan 2018 07:49:00 +0100
Subject: [PATCH] gluon-web: remove useless serialize_json alias

---
 package/gluon-web/luasrc/usr/lib/lua/gluon/web/dispatcher.lua | 3 ++-
 package/gluon-web/luasrc/usr/lib/lua/gluon/web/util.lua       | 3 ---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/package/gluon-web/luasrc/usr/lib/lua/gluon/web/dispatcher.lua b/package/gluon-web/luasrc/usr/lib/lua/gluon/web/dispatcher.lua
index 90318ce64..de6e6a877 100644
--- a/package/gluon-web/luasrc/usr/lib/lua/gluon/web/dispatcher.lua
+++ b/package/gluon-web/luasrc/usr/lib/lua/gluon/web/dispatcher.lua
@@ -4,6 +4,7 @@
 -- Licensed to the public under the Apache License 2.0.
 
 local fs = require "nixio.fs"
+local json = require "luci.jsonc"
 local tpl = require "gluon.web.template"
 local util = require "gluon.web.util"
 local proto = require "gluon.web.http.protocol"
@@ -126,7 +127,7 @@ function dispatch(http, request)
 		end
 
 		if type(val) == "table" then
-			val = util.serialize_json(val)
+			val = json.stringify(val)
 		end
 
 		return string.format(' %s="%s"', key, util.pcdata(tostring(val)))
diff --git a/package/gluon-web/luasrc/usr/lib/lua/gluon/web/util.lua b/package/gluon-web/luasrc/usr/lib/lua/gluon/web/util.lua
index 8259ff959..7f2f1ccc3 100644
--- a/package/gluon-web/luasrc/usr/lib/lua/gluon/web/util.lua
+++ b/package/gluon-web/luasrc/usr/lib/lua/gluon/web/util.lua
@@ -5,7 +5,6 @@
 local io = require "io"
 local table = require "table"
 local tparser = require "gluon.web.template.parser"
-local json = require "luci.jsonc"
 local nixio = require "nixio"
 local fs = require "nixio.fs"
 
@@ -93,8 +92,6 @@ function uniqueid(bytes)
 	return nixio.bin.hexlify(rand)
 end
 
-serialize_json = json.stringify
-
 function libpath()
 	return '/lib/gluon/web'
 end
-- 
GitLab