PHP - JavaScript Object Notation Functions
An Object implementing JsonSerializable interface can customize their JSON representation when encoded with the json_encode() function.
Syntax
JsonSerializable {
/* Methods */
abstract public mixed jsonSerialize( void )
}
php_function_reference.htm
Advertisements