The JsonSerializable interfaceIntroductionObjects implementing JsonSerializable can customize their JSON representation when encoded with json_encode. Interface synopsis
JsonSerializable
/* Methods */
public mixed JsonSerializable::jsonSerialize()
|