| 1900 | } |
| 1901 | |
| 1902 | bool 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 | |
| 1929 | Value& CharReaderBuilder::operator[](const String& key) { |
| 1930 | return settings_[key]; |
no test coverage detected