MCPcopy Create free account
hub / github.com/SICKAG/sick_scan_xd / newCharReader

Method newCharReader

test/docker/jsoncpp/src/lib_json/json_reader.cpp:1894–1913  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1892CharReaderBuilder::CharReaderBuilder() { setDefaults(&settings_); }
1893CharReaderBuilder::~CharReaderBuilder() = default;
1894CharReader* CharReaderBuilder::newCharReader() const {
1895 bool collectComments = settings_["collectComments"].asBool();
1896 OurFeatures features = OurFeatures::all();
1897 features.allowComments_ = settings_["allowComments"].asBool();
1898 features.allowTrailingCommas_ = settings_["allowTrailingCommas"].asBool();
1899 features.strictRoot_ = settings_["strictRoot"].asBool();
1900 features.allowDroppedNullPlaceholders_ =
1901 settings_["allowDroppedNullPlaceholders"].asBool();
1902 features.allowNumericKeys_ = settings_["allowNumericKeys"].asBool();
1903 features.allowSingleQuotes_ = settings_["allowSingleQuotes"].asBool();
1904
1905 // Stack limit is always a size_t, so we get this as an unsigned int
1906 // regardless of it we have 64-bit integer support enabled.
1907 features.stackLimit_ = static_cast<size_t>(settings_["stackLimit"].asUInt());
1908 features.failIfExtra_ = settings_["failIfExtra"].asBool();
1909 features.rejectDupKeys_ = settings_["rejectDupKeys"].asBool();
1910 features.allowSpecialFloats_ = settings_["allowSpecialFloats"].asBool();
1911 features.skipBom_ = settings_["skipBom"].asBool();
1912 return new OurCharReader(collectComments, features);
1913}
1914
1915bool CharReaderBuilder::validate(Json::Value* invalid) const {
1916 static const auto& valid_keys = *new std::set<String>{

Callers 1

parseFromStreamFunction · 0.80

Calls 2

asBoolMethod · 0.80
asUIntMethod · 0.80

Tested by

no test coverage detected