CakeFest 2024: The Official CakePHP Conference

JsonSerializable インターフェイス

(PHP 5 >= 5.4.0, PHP 7, PHP 8)

はじめに

JsonSerializable を実装したオブジェクトは、 json_encode() を呼んで処理されたときの自身の JSON 表現をカスタマイズできます。

インターフェイス概要

interface JsonSerializable {
/* メソッド */
public jsonSerialize(): mixed
}

目次

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top