Handle query: Difference between revisions
Jump to navigation
Jump to search
Created page with "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]) local ret = json return mw.text.jsonEncode(ret) end return p" |
No edit summary |
||
Line 7: | Line 7: | ||
-- do more processing here | |||
local ret = json | local ret = json | ||
Latest revision as of 14:31, 31 August 2025
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