Module:Jf-JSON/doc: Difference between revisions
Appearance
Content deleted Content added
More direct user of module |
m change source to syntaxhighlight |
||
Line 5: | Line 5: | ||
The suggested loading code of <code>JSON = assert(loadfile "JSON.lua")()</code> will not work in Scribunto. Instead, load the module as follows: |
The suggested loading code of <code>JSON = assert(loadfile "JSON.lua")()</code> will not work in Scribunto. Instead, load the module as follows: |
||
< |
<syntaxhighlight lang="lua"> |
||
local JSON = require('Module:jf-JSON') |
local JSON = require('Module:jf-JSON') |
||
</syntaxhighlight> |
|||
</source> |
|||
You can then use the module as documented in the module comments. |
You can then use the module as documented in the module comments. |
Revision as of 13:26, 7 July 2020
![]() | This Lua module is used in MediaWiki:Gadget-libSensitiveIPs.js. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid major disruption, any changes should be tested in the module's /sandbox or /testcases subpages, or in your own module sandbox. The tested changes can be added to this page in a single edit. Please discuss changes on the talk page before implementing them. |
This is Jeffrey Friedl's JSON.lua library, copied from http://regex.info/blog/lua/json (source code). It is licensed under CC-BY 3.0.
The suggested loading code of JSON = assert(loadfile "JSON.lua")()
will not work in Scribunto. Instead, load the module as follows:
local JSON = require('Module:jf-JSON')
You can then use the module as documented in the module comments.