Skip to content

Strange Code #130

@kaipiyann

Description

@kaipiyann

Working on the SDK I read this method in BlobResourceContents.php and wonder if there is not a problem here :

    public function jsonSerialize(): array
    {
        return [
            'blob' => $this->blob,
            ...$this->jsonSerialize(),
        ];
    }

https://github.com/modelcontextprotocol/php-sdk/blob/757b959bfd2a0842c6af49e5d546e45426aea686/src/Schema/Content/BlobResourceContents.php#L78C1-L84C6

In TextResourceContents.php the method call parent :

    public function jsonSerialize(): array
    {
        return [
            'blob' => $this->blob,
            ...parent::jsonSerialize(),
        ];
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions