21static bool ParsePrechecks(
const std::string& str)
27 if (str.size() != strlen(str.c_str()))
32bool ParseDouble(
const std::string& str,
double *
out)
34 if (!ParsePrechecks(str))
36 if (str.size() >= 2 && str[0] ==
'0' && str[1] ==
'x')
38 std::istringstream text(str);
39 text.imbue(std::locale::classic());
43 return text.eof() && !text.fail();
56 throw std::runtime_error(
"JSON value is not an object or array as expected");
77 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
static bool json_isspace(int ch)