MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / newCharReader

Method newCharReader

Sources/Dependencies/jsoncpp/reader.cpp:1120–1139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1118 }
1119 CharReaderBuilder::~CharReaderBuilder() = default;
1120 CharReader* CharReaderBuilder::newCharReader() const {
1121 bool collectComments = settings_["collectComments"].asBool();
1122 OurFeatures features = OurFeatures::all();
1123 features.allowComments_ = settings_["allowComments"].asBool();
1124 features.allowTrailingCommas_ = settings_["allowTrailingCommas"].asBool();
1125 features.strictRoot_ = settings_["strictRoot"].asBool();
1126 features.allowDroppedNullPlaceholders_ =
1127 settings_["allowDroppedNullPlaceholders"].asBool();
1128 features.allowNumericKeys_ = settings_["allowNumericKeys"].asBool();
1129 features.allowSingleQuotes_ = settings_["allowSingleQuotes"].asBool();
1130
1131 // Stack limit is always a size_t, so we get this as an unsigned int
1132 // regardless of it we have 64-bit integer support enabled.
1133 features.stackLimit_ = static_cast<size_t>(settings_["stackLimit"].asUInt());
1134 features.failIfExtra_ = settings_["failIfExtra"].asBool();
1135 features.rejectDupKeys_ = settings_["rejectDupKeys"].asBool();
1136 features.allowSpecialFloats_ = settings_["allowSpecialFloats"].asBool();
1137 features.skipBom_ = settings_["skipBom"].asBool();
1138 return new OurCharReader(collectComments, features);
1139 }
1140
1141 bool CharReaderBuilder::validate(Json::Value* invalid) const {
1142#ifdef JSONCPP_HAS_STRING_VIEW

Callers 9

RequestMetadataMethod · 0.80
RequestGraphicsMethod · 0.80
MigrateGraphicsMethod · 0.80
OnFetchSuccessMethod · 0.80
ProcessInboundFrameMethod · 0.80

Calls 2

asBoolMethod · 0.80
asUIntMethod · 0.80

Tested by

no test coverage detected