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

jsonrpc: support positional params #792

Open
jchappelow opened this issue Jun 4, 2024 · 0 comments
Open

jsonrpc: support positional params #792

jchappelow opened this issue Jun 4, 2024 · 0 comments

Comments

@jchappelow
Copy link
Member

Presently the params in the JSON-RPC request must be named (an object where the keys are the param names). This is JSON-RPC 2.0 convention. JSON-RPC v1 was initially positional (an array).

Maybe we should also work with positional so for example "params": [] works with request that otherwise do not require any arguments. Or so that "params": ["blah", "asdf"] works where we would otherwise require "params": {"arg1": "blah", "arg2": "asdf"}.

Named parameters are much much easier for server to work with, and also way more friendly if it is desired to omit some args but not others. Still, positional arguments are still part of the JSON-RPC spec.

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

1 participant