|
|
|
@ -283,14 +283,14 @@ const UniValue& find_value(const UniValue& obj, const std::string& name)
@@ -283,14 +283,14 @@ const UniValue& find_value(const UniValue& obj, const std::string& name)
|
|
|
|
|
return NullUniValue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
std::vector<std::string> UniValue::getKeys() const |
|
|
|
|
const std::vector<std::string>& UniValue::getKeys() const |
|
|
|
|
{ |
|
|
|
|
if (typ != VOBJ) |
|
|
|
|
throw std::runtime_error("JSON value is not an object as expected"); |
|
|
|
|
return keys; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
std::vector<UniValue> UniValue::getValues() const |
|
|
|
|
const std::vector<UniValue>& UniValue::getValues() const |
|
|
|
|
{ |
|
|
|
|
if (typ != VOBJ && typ != VARR) |
|
|
|
|
throw std::runtime_error("JSON value is not an object or array as expected"); |
|
|
|
@ -304,7 +304,7 @@ bool UniValue::get_bool() const
@@ -304,7 +304,7 @@ bool UniValue::get_bool() const
|
|
|
|
|
return getBool(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
std::string UniValue::get_str() const |
|
|
|
|
const std::string& UniValue::get_str() const |
|
|
|
|
{ |
|
|
|
|
if (typ != VSTR) |
|
|
|
|
throw std::runtime_error("JSON value is not a string as expected"); |
|
|
|
|