Module:$

This is the current revision of this page, as edited by Alex (talk | contribs) at 23:59, 16 October 2024 (Created page with "local p = {} function p.serialize(frame) return mw.text.jsonEncode(frame:getParent().args) end function p.deserialize(args) local out = {} for k, v in pairs(args) do out[k] = mw.text.jsonDecode(v) end return out end return p"). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:$/doc

local p = {}

function p.serialize(frame)
	return mw.text.jsonEncode(frame:getParent().args)
end

function p.deserialize(args)
	local out = {}
	for k, v in pairs(args) do
		out[k] = mw.text.jsonDecode(v)
	end
	return out
end

return p