MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / RPCConvertValues

Function RPCConvertValues

src/rpcclient.cpp:138–155  ·  view source on GitHub ↗

Convert strings to command-specific RPC representation */

Source from the content-addressed store, hash-verified

136
137/** Convert strings to command-specific RPC representation */
138UniValue RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams)
139{
140 UniValue params(UniValue::VARR);
141
142 for (unsigned int idx = 0; idx < strParams.size(); idx++) {
143 const std::string& strVal = strParams[idx];
144
145 if (!rpcCvtTable.convert(strMethod, idx)) {
146 // insert string value directly
147 params.push_back(strVal);
148 } else {
149 // parse string as JSON, insert bool/number/object/etc. value
150 params.push_back(ParseNonRFCJSONValue(strVal));
151 }
152 }
153
154 return params;
155}
156

Callers 3

CommandLineRPCFunction · 0.85
CallRPCFunction · 0.85
requestMethod · 0.85

Calls 4

ParseNonRFCJSONValueFunction · 0.85
convertMethod · 0.80
sizeMethod · 0.45
push_backMethod · 0.45

Tested by 1

CallRPCFunction · 0.68