| 165 | } |
| 166 | |
| 167 | bool UniValue::checkObject(const std::map<std::string,UniValue::VType>& t) const |
| 168 | { |
| 169 | if (typ != VOBJ) { |
| 170 | return false; |
| 171 | } |
| 172 | |
| 173 | for (const auto& object: t) { |
| 174 | size_t idx = 0; |
| 175 | if (!findKey(object.first, idx)) { |
| 176 | return false; |
| 177 | } |
| 178 | |
| 179 | if (values.at(idx).getType() != object.second) { |
| 180 | return false; |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | return true; |
| 185 | } |
| 186 | |
| 187 | const UniValue& UniValue::operator[](const std::string& key) const |
| 188 | { |