MCPcopy Create free account
hub / github.com/PlayFab/gsdk / validate

Method validate

cpp/cppsdk/jsoncpp.cpp:2189–2205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2187 valid_keys->insert("allowSpecialFloats");
2188}
2189bool CharReaderBuilder::validate(Json::Value* invalid) const {
2190 Json::Value my_invalid;
2191 if (!invalid)
2192 invalid = &my_invalid; // so we do not need to test for NULL
2193 Json::Value& inv = *invalid;
2194 std::set<JSONCPP_STRING> valid_keys;
2195 getValidReaderKeys(&valid_keys);
2196 Value::Members keys = settings_.getMemberNames();
2197 size_t n = keys.size();
2198 for (size_t i = 0; i < n; ++i) {
2199 JSONCPP_STRING const& key = keys[i];
2200 if (valid_keys.find(key) == valid_keys.end()) {
2201 inv[key] = settings_[key];
2202 }
2203 }
2204 return 0u == inv.size();
2205}
2206Value& CharReaderBuilder::operator[](JSONCPP_STRING key) {
2207 return settings_[key];
2208}

Callers

nothing calls this directly

Calls 6

getValidReaderKeysFunction · 0.85
getValidWriterKeysFunction · 0.85
getMemberNamesMethod · 0.80
sizeMethod · 0.80
findMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected