mediawiki-extensions-Scribunto/includes/Engines/LuaCommon/lualib
Kunal Mehta 1000d322e5 Add mw.loadJsonData()
mw.loadData() allows for optimizing the loading Lua tables by requiring
only one parse and lookup. However it's often easier for people to
write/maintain bulk data in JSON rather than Lua tables.

mw.loadJsonData() has roughly the same characteristics as mw.loadData()
and it can be used on JSON content model pages in any namespace.

As noted on the linked bug report, it's possible to already implement
this by writing a wrapper Lua module that loads and parses the JSON
content. But that requires a dummy module for each JSON page, which is
just annoying and inconvenient.

Test cases are copied from the mw.loadData() ones, with a few omissions
for syntax not supported in JSON (e.g. NaN, infinity, etc.).

Bug: T217500
Change-Id: I1b35ad27a37b94064707bb8c9b7108c7078ed4d1
2022-10-13 04:46:25 +00:00
..
luabit Capitalise Engines folder 2022-09-30 00:58:27 +00:00
ustring Capitalise Engines folder 2022-09-30 00:58:27 +00:00
bit32.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
libraryUtil.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
mw.hash.lua Hide mw.hash.setupInterface from users 2022-10-08 22:01:00 +00:00
mw.html.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
mw.language.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
mw.lua Add mw.loadJsonData() 2022-10-13 04:46:25 +00:00
mw.message.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
mw.site.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
mw.text.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
mw.title.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
mw.uri.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
mw.ustring.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
mwInit.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
package.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
strict.lua Add strict.lua to replace "Module:No globals" 2022-10-13 04:39:21 +00:00