MediaWiki  master
JsonSerializer.php
Go to the documentation of this file.
1 <?php
22 namespace MediaWiki\Json;
23 
24 use InvalidArgumentException;
25 
33 interface JsonSerializer {
34 
44  public function serialize( $value );
45 
46  // TODO: move more methods from FormatJson to here.
47 }
serialize( $value)
Encode $value as JSON with an intent to use JsonUnserializer::unserialize to decode it back.