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

Function ParseNonRFCJSONValue

src/rpcclient.cpp:128–135  ·  view source on GitHub ↗

Non-RFC4627 JSON parser, accepts internal values (such as numbers, true, false, null) * as well as objects and arrays. */

Source from the content-addressed store, hash-verified

126 * as well as objects and arrays.
127 */
128UniValue 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 */
138UniValue RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams)

Callers 2

RPCConvertValuesFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 3

isArrayMethod · 0.80
readMethod · 0.45
sizeMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68