MediaWiki
REL1_19
|
JSON formatter wrapper class. More...
Static Public Member Functions | |
static | decode ($value, $assoc=false) |
Decodes a JSON string. | |
static | encode ($value, $isHtml=false) |
Returns the JSON representation of a value. |
JSON formatter wrapper class.
Definition at line 17 of file FormatJson.php.
static FormatJson::decode | ( | $ | value, |
$ | assoc = false |
||
) | [static] |
Decodes a JSON string.
$value | String: the json string being decoded. |
$assoc | Boolean: when true, returned objects will be converted into associative arrays. |
Definition at line 55 of file FormatJson.php.
Referenced by ForeignAPIRepo\fetchImageQuery(), ResourceLoaderModule\getFileDependencies(), MessageBlobStore\getFromDB(), ResourceLoader\preloadModuleInfo(), MessageBlobStore\reencodeBlob(), JsonTest\testDecodeVarTypes(), and MessageBlobStore\updateModule().
static FormatJson::encode | ( | $ | value, |
$ | isHtml = false |
||
) | [static] |
Returns the JSON representation of a value.
$value | Mixed: the value being encoded. Can be any type except a resource. |
$isHtml | Boolean |
Definition at line 32 of file FormatJson.php.
Referenced by ApiFormatJson\execute(), MessageBlobStore\generateMessageBlob(), ResourceLoaderFileModule\getStyles(), MessageBlobStore\reencodeBlob(), and JsonTest\testPhpBug46944Test().