Which version of the JSON-RPC does Bitcoin use?

4

1

Which version of the JSON-RPC protocol does Bitcoin use? 1.0 or 2.0? (This question is asked, but that was almost 3 years ago. link)

If try to use version 2.0 all works well curl --data-binary '{"jsonrpc": "2.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://bitcasino:qwerty@127.0.0.1:8332/ But named parameters are not supported (or I dont know right parameter names).

Also I fount in bitcoind repo file with declared json-rpc error codes: link. Codes named as Standard JSON-RPC 2.0 errors Is it metioned parts, that not specified in 1.0?

So what is the official position now? Still 1.0 ?

Victor Mezrin

Posted 2013-08-20T22:41:31.860

Reputation: 188

Answers

2

1.0, but with a couple of 2.0 features:

"Batch" calls are supported.

And the 2.0 error semantics are used.

Passing named parameters is not supported. "Patches welcome" if you want to add full 2.0 support.

gavinandresen

Posted 2013-08-20T22:41:31.860

Reputation: 3 254