Handle query: Difference between revisions

From Wikisphere
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 difference)

Revision as of 14:30, 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])


  local ret = json

  return mw.text.jsonEncode(ret)
end

return p