Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to specify a Params object instead of individual parameters #28

Open
thomaseizinger opened this issue Apr 16, 2021 · 2 comments

Comments

@thomaseizinger
Copy link
Owner

thomaseizinger commented Apr 16, 2021

If the RPC method has a single parameters called params, we should take that and serialize directly instead of stuffing it into an array / object.

This would give great flexibility to users in how the parameters are serialized.

Also evaluate other heuristics for how we could detect that. Possible an attribute?

@trevor-crypto
Copy link
Contributor

Something that might relate to this is how, right now, you cannot have v2 params that are an array (see here ) , though the JsonRPC v2 spec allows this: https://www.jsonrpc.org/specification#examples

Should I open a new ticket for this, or am I missing how to do this? I ran into it when a server using v2 expected an array for params

@thomaseizinger
Copy link
Owner Author

Something that might relate to this is how, right now, you cannot have v2 params that are an array (see here ) , though the JsonRPC v2 spec allows this: jsonrpc.org/specification#examples

Yes that is a known limitation. Not sure what the best way of achieving this combination is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants