MCPcopy Create free account
hub / github.com/ComodoSecurity/openedr / newCharReader

Method newCharReader

edrav2/eprj/jsoncpp/src/lib_json/json_reader.cpp:1911–1929  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1909CharReaderBuilder::CharReaderBuilder() { setDefaults(&settings_); }
1910CharReaderBuilder::~CharReaderBuilder() = default;
1911CharReader* CharReaderBuilder::newCharReader() const {
1912 bool collectComments = settings_["collectComments"].asBool();
1913 OurFeatures features = OurFeatures::all();
1914 features.allowComments_ = settings_["allowComments"].asBool();
1915 features.strictRoot_ = settings_["strictRoot"].asBool();
1916 features.allowDroppedNullPlaceholders_ =
1917 settings_["allowDroppedNullPlaceholders"].asBool();
1918 features.allowNumericKeys_ = settings_["allowNumericKeys"].asBool();
1919 features.allowSingleQuotes_ = settings_["allowSingleQuotes"].asBool();
1920#if defined(JSON_HAS_INT64)
1921 features.stackLimit_ = settings_["stackLimit"].asUInt64();
1922#else
1923 features.stackLimit_ = settings_["stackLimit"].asUInt();
1924#endif
1925 features.failIfExtra_ = settings_["failIfExtra"].asBool();
1926 features.rejectDupKeys_ = settings_["rejectDupKeys"].asBool();
1927 features.allowSpecialFloats_ = settings_["allowSpecialFloats"].asBool();
1928 return new OurCharReader(collectComments, features);
1929}
1930static void getValidReaderKeys(std::set<JSONCPP_STRING>* valid_keys) {
1931 valid_keys->clear();
1932 valid_keys->insert("collectComments");

Callers 3

parseFromStreamFunction · 0.80
JSONTEST_FIXTUREFunction · 0.80
loadfromJsonFunction · 0.80

Calls 4

asBoolMethod · 0.80
asUInt64Method · 0.80
asUIntMethod · 0.80
allFunction · 0.50

Tested by

no test coverage detected