40 static bool validNumStr(
const string& s)
43 unsigned int consumed;
50 if (!validNumStr(val_))
65 return setNumStr(oss.str());
74 return setNumStr(oss.str());
81 oss << std::setprecision(16) << val_;
83 bool ret = setNumStr(oss.str());
115 values.push_back(val_);
124 values.insert(values.end(), vec.begin(), vec.end());
132 values.push_back(val_);
141 if (findKey(key, idx))
150 if (typ != VOBJ || obj.
typ != VOBJ)
153 for (
size_t i = 0; i < obj.
keys.size(); i++)
165 for (
size_t i = 0; i < keys.size(); i++)
166 kv[keys[i]] = values[i];
171 for (
size_t i = 0; i < keys.size(); i++) {
172 if (keys[i] == key) {
186 for (std::map<std::string,UniValue::VType>::const_iterator it = t.begin();
187 it != t.end(); ++it) {
189 if (!findKey(it->first, idx))
192 if (values.at(idx).getType() != it->second)
205 if (!findKey(key, index))
208 return values.at(index);
213 if (typ != VOBJ && typ != VARR)
215 if (index >= values.size())
218 return values.at(index);
238 for (
unsigned int i = 0; i < obj.
keys.size(); i++)
239 if (obj.
keys[i] == name)
bool setNumStr(const std::string &val)
const char * uvTypeName(UniValue::VType t)
void getObjMap(std::map< std::string, UniValue > &kv) const
std::hash for asio::adress
std::vector< UniValue > values
bool pushKVs(const UniValue &obj)
const UniValue & operator[](const std::string &key) const
enum jtokentype getJsonToken(std::string &tokenVal, unsigned int &consumed, const char *raw, const char *end)
bool push_back(const UniValue &val)
bool setFloat(double val)
bool pushKV(const std::string &key, const UniValue &val)
bool setStr(const std::string &val)
bool setInt(uint64_t val)
const UniValue & find_value(const UniValue &obj, const std::string &name)
bool push_backV(const std::vector< UniValue > &vec)
std::vector< std::string > keys
bool checkObject(const std::map< std::string, UniValue::VType > &memberTypes) const
bool findKey(const std::string &key, size_t &retIdx) const
void __pushKV(const std::string &key, const UniValue &val)
const UniValue NullUniValue