|
MediaWiki
REL1_20
|
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 28 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 63 of file FormatJson.php.
References $value.
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 43 of file FormatJson.php.
References $value.
Referenced by ApiFormatJson\execute(), MessageBlobStore\generateMessageBlob(), ResourceLoaderFileModule\getStyles(), MessageBlobStore\reencodeBlob(), and JsonTest\testPhpBug46944Test().