JsonSerializable
interface JsonSerializable (View source)
Objects implementing JsonSerializable can customize their JSON representation when encoded with json_encode.
Methods
mixed
jsonSerialize()
Specify data which should be serialized to JSON
Details
mixed
jsonSerialize()
Since: 5.4
Specify data which should be serialized to JSON