The JsonSerializable interface
(PHP 5 >= 5.4.0)
Introduction
Objects implementing JsonSerializable can customize their JSON representation when encoded with json_encode().
Interface synopsis
Table of Contents
- JsonSerializable::jsonSerialize — Specify data which should be serialized to JSON
Коментарии
`json_encode` returns `string|false`. Why does `jsonSerialize` return `mixed`?