MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / loadJsonString

Method loadJsonString

extensions/libarchive/ArchiveMetadata.cpp:174–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174void ArchiveStack::loadJsonString(const std::string& input) {
175 rapidjson::Document lensStack;
176 rapidjson::ParseResult ok = lensStack.Parse(input.c_str());
177
178 if (!ok) {
179 std::stringstream ss;
180 ss << "Failed to parse archive lens stack from JSON string with reason: "
181 << rapidjson::GetParseError_En(ok.Code())
182 << " at offset " << ok.Offset();
183
184 throw Exception(ExceptionType::GENERAL_EXCEPTION, ss.str());
185 }
186
187 loadJson(lensStack);
188}
189
190rapidjson::Document ArchiveStack::toJson() const {
191 rapidjson::Document lensStack(rapidjson::kArrayType);

Callers 3

fromJsonStringMethod · 0.80
onTriggerMethod · 0.80
onTriggerMethod · 0.80

Calls 2

ExceptionClass · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected