| 1884 | } |
| 1885 | CharReaderBuilder::~CharReaderBuilder() {} |
| 1886 | CharReader* CharReaderBuilder::newCharReader() const { |
| 1887 | bool collectComments = settings_["collectComments"].asBool(); |
| 1888 | OurFeatures features = OurFeatures::all(); |
| 1889 | features.allowComments_ = settings_["allowComments"].asBool(); |
| 1890 | features.strictRoot_ = settings_["strictRoot"].asBool(); |
| 1891 | features.allowDroppedNullPlaceholders_ = settings_["allowDroppedNullPlaceholders"].asBool(); |
| 1892 | features.allowNumericKeys_ = settings_["allowNumericKeys"].asBool(); |
| 1893 | features.allowSingleQuotes_ = settings_["allowSingleQuotes"].asBool(); |
| 1894 | features.stackLimit_ = settings_["stackLimit"].asInt(); |
| 1895 | features.failIfExtra_ = settings_["failIfExtra"].asBool(); |
| 1896 | features.rejectDupKeys_ = settings_["rejectDupKeys"].asBool(); |
| 1897 | features.allowSpecialFloats_ = settings_["allowSpecialFloats"].asBool(); |
| 1898 | return new OurCharReader(collectComments, features); |
| 1899 | } |
| 1900 | static void getValidReaderKeys(std::set<std::string>* valid_keys) { |
| 1901 | valid_keys->clear(); |
| 1902 | valid_keys->insert("collectComments"); |
no test coverage detected