diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-09-25 20:42:49 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-01-05 11:30:20 +0100 |
commit | 6f1c76ae14c884c919db9ed720c7776aa0748244 (patch) | |
tree | a67faa852cb940ff4503ffe639c9cd92e3810d29 /src/net_processing.cpp | |
parent | 5865d41f889d326b51fb0b68be9a41c46d6cad83 (diff) |
rpc: Support named arguments
The [JSON-RPC specification](http://www.jsonrpc.org/specification) allows passing parameters as an Array, for by-position
arguments, or an Object, for by-name arguments.
This implements by-name arguments, but preserves full backwards compatibility. API using by-name arguments are
easier to extend, and easier to use (no need to guess which argument goes where).
Named are mapped to positions by a per-call structure, provided through the RPC command table.
Missing arguments will be replaced by null, except if at the end, then the argument is left out completely.
Currently calls fail (though not crash) on intermediate nulls, but this should be improved on a per-call basis later.
Diffstat (limited to 'src/net_processing.cpp')
0 files changed, 0 insertions, 0 deletions