MCPcopy Create free account
hub / github.com/Samsung/ONE / validate

Method validate

runtime/3rdparty/jsoncpp/jsoncpp.cpp:2353–2380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2351}
2352
2353bool CharReaderBuilder::validate(Json::Value *invalid) const
2354{
2355 static const auto &valid_keys = *new std::set<String>{
2356 "collectComments",
2357 "allowComments",
2358 "allowTrailingCommas",
2359 "strictRoot",
2360 "allowDroppedNullPlaceholders",
2361 "allowNumericKeys",
2362 "allowSingleQuotes",
2363 "stackLimit",
2364 "failIfExtra",
2365 "rejectDupKeys",
2366 "allowSpecialFloats",
2367 "skipBom",
2368 };
2369 for (auto si = settings_.begin(); si != settings_.end(); ++si)
2370 {
2371 auto key = si.name();
2372 if (valid_keys.count(key))
2373 continue;
2374 if (invalid)
2375 (*invalid)[key] = *si;
2376 else
2377 return false;
2378 }
2379 return invalid ? invalid->empty() : true;
2380}
2381
2382Value &CharReaderBuilder::operator[](const String &key) { return settings_[key]; }
2383// static

Callers 1

Convolution.cppFile · 0.45

Calls 5

beginMethod · 0.45
endMethod · 0.45
nameMethod · 0.45
countMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected