Skip to content

建议增加jsonrpc2 支持 #431

Description

@it512

jsonrpc2 比较简单, 而且适用范围较广, lsp, mcp等协议都是基于jsonrpc2

jsonrpc2 主流的实现有2种, 1 基于tcp, 2 基于 http,本身不依赖传输层,基于http 的实现, 作为一个轻量级的rpc协议,在应用中也很适合作为grpc的备选和替代方案。

目前市面上没有较好的jsonrpc2 的client, 由于 协议本身很简单,且标准化程度,和成熟度极高, 建议 在req中直接支持

这个项目 可以作为参考实现 : https://github.com/ybbus/jsonrpc

例如:
··· golang
client.R().JosnrpcCallFor(ctx context.Context, in any , out any) error
client.R().JosnrpcCallRaw
JosnrpcCall
JosnrpcCallBatch // 这个比较复杂,如果能实现更好
···
其中 in和out 为指针类型

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions