paritytech / jsonrpc

Rust JSON-RPC implementation
MIT License
791 stars 274 forks source link

Notify should allow Obj Params #675

Open sampaioletti opened 2 years ago

sampaioletti commented 2 years ago

I can't find in the json-rpc 2.0 spec where a notify params can't be objects. Current implementation only allows null or array.

https://github.com/paritytech/jsonrpc/blob/38af3c9439aa75481805edf6c05c6622a5ab1e70/core-client/transports/src/lib.rs#L298-L307

I believe it should implement the same logic as the call_method implementation above it

https://github.com/paritytech/jsonrpc/blob/38af3c9439aa75481805edf6c05c6622a5ab1e70/core-client/transports/src/lib.rs#L269-L284

I can do a PR if I'm correct in my research.

Wonderful project. Thank you.