listunspent yields error in Windows

+1 vote
On a Windows 10 workstation

"version" : "1.0.2",
    "nodeversion" : 10002901,
    "protocolversion" : 10009,
...    

c:\temp\multichain>multichain-cli MyCoin_Test listunspent 0 100 '["1CXotAhZ7iqFeSo2dRxdqe7SuRKDYBomUwkn73"]'
error: Error parsing JSON:'[1CXotAhZ7iqFeSo2dRxdqe7SuRKDYBomUwkn73]'

If I write:

c:\temp\multichain>multichain-cli MyCoin_Test listunspent 0 100 '[\"1CXotAhZ7iqFeSo2dRxdqe7SuRKDYBomUwkn73\"]'
error: Error parsing JSON:'["1CXotAhZ7iqFeSo2dRxdqe7SuRKDYBomUwkn73"]'

I get no problems with the same version under Ubuntu 16.04, works fine there..
related to an answer for: listunspent addresses param
asked Feb 7, 2018 by Xavi

1 Answer

0 votes

This is just about the fact that the Windows command line uses different escaping from the Linux command line. Please take a look at the Windows README.txt file to see how it changes.

answered Feb 7, 2018 by MultiChain
got it working using "[\"1CXotAhZ7iqFeSo2dRxdqe7SuRKDYBomUwkn73\"]" as stated. Thank you!!
...