Module:Json: Revision history

From TwogPedia

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

22 August 2022

19 August 2022

  • curprev 21:1021:10, 19 August 2022Couchor talk contribs 1,143 bytes +1,143 Created page with "local Json = {} local Arguments = require('Module:Arguments') function Json.fromArgs(frame) local args = Arguments.getArgs(frame) return Json.stringify(args) end function Json.stringify(obj, pretty) return mw.text.jsonEncode(obj, pretty == true and mw.text.JSON_PRETTY or nil) end function Json.parse(obj) local parse = function(object) return mw.text.jsonDecode(object, mw.text.JSON_TRY_FIXING) end local status, res = pcall(parse, obj); if status then return re..."