Handle query

From Wikisphere
Revision as of 14:31, 31 August 2025 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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