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

Function ParseNonRFCJSONValue

src/rpc/client.cpp:214–221  ·  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

212 * as well as objects and arrays.
213 */
214UniValue ParseNonRFCJSONValue(const std::string& strVal)
215{
216 UniValue jVal;
217 if (!jVal.read(std::string("[")+strVal+std::string("]")) ||
218 !jVal.isArray() || jVal.size()!=1)
219 throw std::runtime_error(std::string("Error parsing JSON:")+strVal);
220 return jVal[0];
221}
222
223UniValue RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams)
224{

Callers 3

BOOST_AUTO_TEST_CASEFunction · 0.85
RPCConvertValuesFunction · 0.85
RPCConvertNamedValuesFunction · 0.85

Calls 3

isArrayMethod · 0.80
readMethod · 0.45
sizeMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68