MCPcopy Create free account
hub / github.com/Samsung/ONE / newCharReader

Method newCharReader

runtime/3rdparty/jsoncpp/jsoncpp.cpp:2332–2351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2330CharReaderBuilder::CharReaderBuilder() { setDefaults(&settings_); }
2331CharReaderBuilder::~CharReaderBuilder() = default;
2332CharReader *CharReaderBuilder::newCharReader() const
2333{
2334 bool collectComments = settings_["collectComments"].asBool();
2335 OurFeatures features = OurFeatures::all();
2336 features.allowComments_ = settings_["allowComments"].asBool();
2337 features.allowTrailingCommas_ = settings_["allowTrailingCommas"].asBool();
2338 features.strictRoot_ = settings_["strictRoot"].asBool();
2339 features.allowDroppedNullPlaceholders_ = settings_["allowDroppedNullPlaceholders"].asBool();
2340 features.allowNumericKeys_ = settings_["allowNumericKeys"].asBool();
2341 features.allowSingleQuotes_ = settings_["allowSingleQuotes"].asBool();
2342
2343 // Stack limit is always a size_t, so we get this as an unsigned int
2344 // regardless of it we have 64-bit integer support enabled.
2345 features.stackLimit_ = static_cast<size_t>(settings_["stackLimit"].asUInt());
2346 features.failIfExtra_ = settings_["failIfExtra"].asBool();
2347 features.rejectDupKeys_ = settings_["rejectDupKeys"].asBool();
2348 features.allowSpecialFloats_ = settings_["allowSpecialFloats"].asBool();
2349 features.skipBom_ = settings_["skipBom"].asBool();
2350 return new OurCharReader(collectComments, features);
2351}
2352
2353bool CharReaderBuilder::validate(Json::Value *invalid) const
2354{

Callers 1

parseFromStreamFunction · 0.80

Calls 2

asUIntMethod · 0.80
asBoolMethod · 0.45

Tested by

no test coverage detected