src/Leevel/Database/Ddd/Entity.php
public function toJson($option = null): string
    {
        if (null === $option) {
            $option = JSON_UNESCAPED_UNICODE;
        }

        return json_encode($this->toArray(), $option);
    }
public function toJson($option = null): string
    {
        if (null === $option) {
            $option = JSON_UNESCAPED_UNICODE;
        }

        return json_encode($this->toArray(), $option);
    }
对象转 JSON.

@param int $option

@return string