Handle query
Jump to navigation
Jump to search
Documentation for this module may be created at Module:Handle query/doc
local p = {}
function p.main(frame)
-- local args = frame:getParent().args
local origArgs = (type(frame.getParent) == "function") and frame:getParent().args or frame
local success, json = pcall(mw.text.jsonDecode, origArgs[0])
-- do more processing here
local ret = json
return mw.text.jsonEncode(ret)
end
return p