Non-RFC4627 JSON parser, accepts internal values (such as numbers, true, false, null) * as well as objects and arrays. */
| 126 | * as well as objects and arrays. |
| 127 | */ |
| 128 | UniValue ParseNonRFCJSONValue(const std::string& strVal) |
| 129 | { |
| 130 | UniValue jVal; |
| 131 | if (!jVal.read(std::string("[")+strVal+std::string("]")) || |
| 132 | !jVal.isArray() || jVal.size()!=1) |
| 133 | throw runtime_error(string("Error parsing JSON:")+strVal); |
| 134 | return jVal[0]; |
| 135 | } |
| 136 | |
| 137 | /** Convert strings to command-specific RPC representation */ |
| 138 | UniValue RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams) |