MCPcopy Create free account
hub / github.com/LUX-Core/lux / ParseNonRFCJSONValue

Function ParseNonRFCJSONValue

src/rpcclient.cpp:212–219  ·  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

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

Callers 3

RPCConvertValuesFunction · 0.85
RPCConvertNamedValuesFunction · 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