seredat / karbowanec

Karbo (Karbovanets) - Digital Exchange Medium - cryptocurrency made in Ukraine, CryptoNote protocol implementation.
https://karbo.io/
Other
104 stars 66 forks source link

getblockcount - JsonValue type is not ARRAY or OBJECT #30

Closed easyhash closed 6 years ago

easyhash commented 6 years ago

When trying to retrieve getblockcount from the Linux daemon RPC interface, i get JsonValue type is not ARRAY or OBJECT

curl -X POST http://daemon:19734/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"getblockcount"}' -H 'Content-Type: application/json'
{"error":{"code":-32603,"message":"JsonValue type is not ARRAY or OBJECT"},"id":"0","jsonrpc":"2.0"}
zawy12 commented 6 years ago

I had a similar problem. Karbo has an extra requirement that other monero's don't. Try inserting "params": {}, like this:

curl -X POST http://daemon:19734/json_rpc -d '{"params": {}, "jsonrpc":"2.0","id":"0","method":"getblockcount"}' -H 'Content-Type: application/json'