method
public
Jsonable::toJson()
Сигнатура
public toJson([mixed $options = 0 ]) : array<string|int, mixed>
Параметры
$options
mixed
= 0
Возвращаемое значение
array<string|int, mixed>
Как применяется в Jsonable
Jsonable::toJson() — метод интерфейса \Bitrix\Main\Type\Contract\Jsonable модуля «Главный модуль».
Метод объекта: сначала нужен объект, реализующий Jsonable.
use Bitrix\Main\Type\Contract\Jsonable;
/** @var Jsonable $object */
$result = $object->toJson();
// $result: array<string|int, mixed>toJson() есть и у других классов модуля «Главный модуль»: Converter.
Исходный файл: source/main/lib/type/contract/jsonable.php:10

