| 2159 | CharReaderBuilder::CharReaderBuilder() { setDefaults(&settings_); } |
| 2160 | CharReaderBuilder::~CharReaderBuilder() {} |
| 2161 | CharReader* CharReaderBuilder::newCharReader() const { |
| 2162 | bool collectComments = settings_["collectComments"].asBool(); |
| 2163 | OurFeatures features = OurFeatures::all(); |
| 2164 | features.allowComments_ = settings_["allowComments"].asBool(); |
| 2165 | features.strictRoot_ = settings_["strictRoot"].asBool(); |
| 2166 | features.allowDroppedNullPlaceholders_ = |
| 2167 | settings_["allowDroppedNullPlaceholders"].asBool(); |
| 2168 | features.allowNumericKeys_ = settings_["allowNumericKeys"].asBool(); |
| 2169 | features.allowSingleQuotes_ = settings_["allowSingleQuotes"].asBool(); |
| 2170 | features.stackLimit_ = settings_["stackLimit"].asInt(); |
| 2171 | features.failIfExtra_ = settings_["failIfExtra"].asBool(); |
| 2172 | features.rejectDupKeys_ = settings_["rejectDupKeys"].asBool(); |
| 2173 | features.allowSpecialFloats_ = settings_["allowSpecialFloats"].asBool(); |
| 2174 | return new OurCharReader(collectComments, features); |
| 2175 | } |
| 2176 | static void getValidReaderKeys(std::set<JSONCPP_STRING>* valid_keys) { |
| 2177 | valid_keys->clear(); |
| 2178 | valid_keys->insert("collectComments"); |
no test coverage detected