|
| | serialize ( $value) |
| | Encode $value as JSON with an intent to use JsonDeserializer::unserialize to decode it back.
|
| |
Definition at line 20 of file JsonSerializer.php.
◆ serialize()
| MediaWiki\Json\JsonSerializer::serialize |
( |
| $value | ) |
|
Encode $value as JSON with an intent to use JsonDeserializer::unserialize to decode it back.
- Parameters
-
| mixed | JsonDeserializable | $value | A value to encode. Can be any scalar, array, stdClass, JsonDeserializable or any combination of them. |
- Exceptions
-
| JsonException | if the value can not be serialized. |
- Returns
- string
The documentation for this interface was generated from the following file: