| 221 | } |
| 222 | |
| 223 | UniValue RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams) |
| 224 | { |
| 225 | UniValue params(UniValue::VARR); |
| 226 | |
| 227 | for (unsigned int idx = 0; idx < strParams.size(); idx++) { |
| 228 | const std::string& strVal = strParams[idx]; |
| 229 | |
| 230 | if (!rpcCvtTable.convert(strMethod, idx)) { |
| 231 | // insert string value directly |
| 232 | params.push_back(strVal); |
| 233 | } else { |
| 234 | // parse string as JSON, insert bool/number/object/etc. value |
| 235 | params.push_back(ParseNonRFCJSONValue(strVal)); |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | return params; |
| 240 | } |
| 241 | |
| 242 | UniValue RPCConvertNamedValues(const std::string &strMethod, const std::vector<std::string> &strParams) |
| 243 | { |