| 283 | } |
| 284 | |
| 285 | UniValue RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams) |
| 286 | { |
| 287 | UniValue params(UniValue::VARR); |
| 288 | |
| 289 | for (unsigned int idx = 0; idx < strParams.size(); idx++) { |
| 290 | const std::string& strVal = strParams[idx]; |
| 291 | |
| 292 | if (!rpcCvtTable.convert(strMethod, idx)) { |
| 293 | // insert string value directly |
| 294 | params.push_back(strVal); |
| 295 | } else { |
| 296 | // parse string as JSON, insert bool/number/object/etc. value |
| 297 | params.push_back(ParseNonRFCJSONValue(strVal)); |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | return params; |
| 302 | } |
| 303 | |
| 304 | UniValue RPCConvertNamedValues(const std::string &strMethod, const std::vector<std::string> &strParams) |
| 305 | { |