17static bool ParsePrechecks(
const std::string& str)
23 if (str.size() != strlen(str.c_str()))
28bool ParseDouble(
const std::string& str,
double *
out)
30 if (!ParsePrechecks(str))
32 if (str.size() >= 2 && str[0] ==
'0' && str[1] ==
'x')
34 std::istringstream text(str);
35 text.imbue(std::locale::classic());
39 return text.eof() && !text.fail();
52 throw std::runtime_error(
"JSON value is not an object or array as expected");
73 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)