Title: Extracting info using RPC Post by: BTC_1 on December 15, 2016, 07:13:20 PM Is it possible to extract specific info from a bitcoin rpc call
Example and im going to use an altcoin as its easier but I guess the same applies to BTC I use the command "Swingd getmininginfo" and the out put is this: Code: "Blocks" : 405319, Is it possible to adjust the command "getmininginfo" to display for example Net MH/s or Net Stake Weight instead of all the output ? I am building a webpage that I want to show weight and net hash but not the rest of the out put Thanks Title: Re: Extracting info using RPC Post by: achow101 on December 15, 2016, 07:15:58 PM You can use a JSON library to parse the output (which is in JSON format) and then pull out the parts that you want. Or you can directly modify the source code for the RPC to only give you the info that you want.
Title: Re: Extracting info using RPC Post by: BTC_1 on December 15, 2016, 07:21:02 PM You can use a JSON library to parse the output (which is in JSON format) and then pull out the parts that you want. Or you can directly modify the source code for the RPC to only give you the info that you want. Thanks for the speedy reply. JSON is out of the question for this project and i have tried various commands such as getnethash etc etc but none work Title: Re: Extracting info using RPC Post by: fikihafana on December 16, 2016, 11:21:03 PM All you need to do is parsing json output, and do simple calculation
|