| 2092 | CharReaderBuilder::CharReaderBuilder() { setDefaults(&settings_); } |
| 2093 | CharReaderBuilder::~CharReaderBuilder() = default; |
| 2094 | CharReader *CharReaderBuilder::newCharReader() const { |
| 2095 | bool collectComments = settings_["collectComments"].asBool(); |
| 2096 | OurFeatures features = OurFeatures::all(); |
| 2097 | features.allowComments_ = settings_["allowComments"].asBool(); |
| 2098 | features.strictRoot_ = settings_["strictRoot"].asBool(); |
| 2099 | features.allowDroppedNullPlaceholders_ = |
| 2100 | settings_["allowDroppedNullPlaceholders"].asBool(); |
| 2101 | features.allowNumericKeys_ = settings_["allowNumericKeys"].asBool(); |
| 2102 | features.allowSingleQuotes_ = settings_["allowSingleQuotes"].asBool(); |
| 2103 | #if defined(JSON_HAS_INT64) |
| 2104 | features.stackLimit_ = settings_["stackLimit"].asUInt64(); |
| 2105 | #else |
| 2106 | features.stackLimit_ = settings_["stackLimit"].asUInt(); |
| 2107 | #endif |
| 2108 | features.failIfExtra_ = settings_["failIfExtra"].asBool(); |
| 2109 | features.rejectDupKeys_ = settings_["rejectDupKeys"].asBool(); |
| 2110 | features.allowSpecialFloats_ = settings_["allowSpecialFloats"].asBool(); |
| 2111 | return new OurCharReader(collectComments, features); |
| 2112 | } |
| 2113 | static void getValidReaderKeys(std::set<String> *valid_keys) { |
| 2114 | valid_keys->clear(); |
| 2115 | valid_keys->insert("collectComments"); |
no test coverage detected