MediaWiki master
|
Inherited by MediaWiki\Json\JsonCodec.
Public Member Functions | |
serialize ( $value) | |
Encode $value as JSON with an intent to use JsonDeserializer::unserialize to decode it back. | |
Definition at line 33 of file JsonSerializer.php.
MediaWiki\Json\JsonSerializer::serialize | ( | $value | ) |
Encode $value as JSON with an intent to use JsonDeserializer::unserialize to decode it back.
mixed | JsonDeserializable | $value | A value to encode. Can be any scalar, array, stdClass, JsonDeserializable or any combination of them. |
InvalidArgumentException | if the value can not be serialized. |
Implemented in MediaWiki\Json\JsonCodec.