Skip to content
Snippets Groups Projects
Unverified Commit 12103d96 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-web: remove useless serialize_json alias

parent 01336f70
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
-- Licensed to the public under the Apache License 2.0. -- Licensed to the public under the Apache License 2.0.
local fs = require "nixio.fs" local fs = require "nixio.fs"
local json = require "luci.jsonc"
local tpl = require "gluon.web.template" local tpl = require "gluon.web.template"
local util = require "gluon.web.util" local util = require "gluon.web.util"
local proto = require "gluon.web.http.protocol" local proto = require "gluon.web.http.protocol"
...@@ -126,7 +127,7 @@ function dispatch(http, request) ...@@ -126,7 +127,7 @@ function dispatch(http, request)
end end
if type(val) == "table" then if type(val) == "table" then
val = util.serialize_json(val) val = json.stringify(val)
end end
return string.format(' %s="%s"', key, util.pcdata(tostring(val))) return string.format(' %s="%s"', key, util.pcdata(tostring(val)))
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
local io = require "io" local io = require "io"
local table = require "table" local table = require "table"
local tparser = require "gluon.web.template.parser" local tparser = require "gluon.web.template.parser"
local json = require "luci.jsonc"
local nixio = require "nixio" local nixio = require "nixio"
local fs = require "nixio.fs" local fs = require "nixio.fs"
...@@ -93,8 +92,6 @@ function uniqueid(bytes) ...@@ -93,8 +92,6 @@ function uniqueid(bytes)
return nixio.bin.hexlify(rand) return nixio.bin.hexlify(rand)
end end
serialize_json = json.stringify
function libpath() function libpath()
return '/lib/gluon/web' return '/lib/gluon/web'
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment