Non-RFC4627 JSON parser, accepts internal values (such as numbers, true, false, null) * as well as objects and arrays. */
| 274 | * as well as objects and arrays. |
| 275 | */ |
| 276 | UniValue ParseNonRFCJSONValue(const std::string& strVal) |
| 277 | { |
| 278 | UniValue jVal; |
| 279 | if (!jVal.read(std::string("[")+strVal+std::string("]")) || |
| 280 | !jVal.isArray() || jVal.size()!=1) |
| 281 | throw std::runtime_error(std::string("Error parsing JSON: ") + strVal); |
| 282 | return jVal[0]; |
| 283 | } |
| 284 | |
| 285 | UniValue RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams) |
| 286 | { |