25 if (str.size() >= 1 &&
30 if (str.size() !=
strlen(str.c_str())) {
37bool ParseDouble(
const std::string &str,
double *out) {
41 if (str.size() >= 2 && str[0] ==
'0' && str[1] ==
'x') {
45 std::istringstream text(str);
46 text.imbue(std::locale::classic());
52 return text.eof() && !text.fail();
63 throw std::runtime_error(
64 "JSON value is not an object or array as expected");
83 throw std::runtime_error(
"JSON double out of range");
const std::string & get_str() const
const std::string & getValStr() const
const UniValue & get_obj() const
const std::vector< UniValue > & getValues() const
const std::vector< std::string > & getKeys() const
std::vector< UniValue > values
std::vector< std::string > keys
void checkType(const VType &expected) const
const UniValue & get_array() const
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
static bool json_isspace(int ch)