Module:JSON/doc

This module is a light-weight utility module for dealing with JSON, and is an alternative to the built-in MediaWiki functions and.

Loading the module
To load this module and make its method available for use, Add this line of code to the start of your module:

All methods described below will be available under the loaded table.

Alternatively, you can use this module using the code below by using Module:LoadLib.

Depending on the settings you used in, the methods of this module may be available under their respective variables in the module this module was loaded in.

Methods
The methods documented below will be available for use under the variable name you loaded this module in.

This method returns a JSON-encoded version of. Mixed tabled are allowed, but any circular references or keys other than strings/numbers will cause an error.

This method returns a JSON-decoded version of. Any syntax errors in JSON will be pointed out if there is any.