json_encode 语法简介:
(PHP 5 >= 5.2.0, PHP 7, PHP 8, PECL json >= 1.2.0)
json_encode — 对变量进行 JSON 编码
说明
json_encode(mixed $value, int $options = 0, int $depth = 512): string|false返回字符串,包含了 value 值 JSON 形式的表示。编码受传入的 options 参数影响,此外浮点值的编码依赖于 serialize_precision。