MCPcopy Create free account
hub / github.com/Kitware/CMake / validate

Method validate

Utilities/cmjsoncpp/src/lib_json/json_reader.cpp:1902–1927  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1900}
1901
1902bool CharReaderBuilder::validate(Json::Value* invalid) const {
1903 static const auto& valid_keys = *new std::set<String>{
1904 "collectComments",
1905 "allowComments",
1906 "allowTrailingCommas",
1907 "strictRoot",
1908 "allowDroppedNullPlaceholders",
1909 "allowNumericKeys",
1910 "allowSingleQuotes",
1911 "stackLimit",
1912 "failIfExtra",
1913 "rejectDupKeys",
1914 "allowSpecialFloats",
1915 "skipBom",
1916 };
1917 for (auto si = settings_.begin(); si != settings_.end(); ++si) {
1918 auto key = si.name();
1919 if (valid_keys.count(key))
1920 continue;
1921 if (invalid)
1922 (*invalid)[key] = *si;
1923 else
1924 return false;
1925 }
1926 return invalid ? invalid->empty() : true;
1927}
1928
1929Value& CharReaderBuilder::operator[](const String& key) {
1930 return settings_[key];

Calls 5

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

Tested by

no test coverage detected