MediaWiki API help
This is an auto-generated MediaWiki API documentation page.
Documentation and examples: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=jsontransform
(main | jsontransform)
- This module is internal or unstable, and you should not use it. Its operation may change without notice.
- This module requires read rights.
- Source: JsonConfig
- License: GPL-2.0-or-later
Retrieve JSON data transformed by a Lua function.
Specific parameters:
Other general parameters are available.
- title
Title to process without namespace prefix.
- This parameter is required.
- jtmodule
Name of Lua module to load transform code from. Defaults to Module: namespace.
- This parameter is required.
- jtfunction
Name of Lua function to run
- This parameter is required.
- jtargs
Sequence of strings to pass as arguments to the Lua transform function
- Separate values with | or alternative.
- Maximum number of values is 50 (500 for clients that are allowed higher limits).
Example:
- Get JSON content of the Sample.tab page running through a Lua transform
- api.php?action=jsontransform&formatversion=2&format=jsonfm&title=Sample.tab&jtmodule=Samples&jtfunction=round&jtargs=decimals=2|columns=a,b [open in sandbox]