JSON 序列化接口

(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