MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / GetJson

Method GetJson

http.cpp:459–471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

457
458
459 Json::Value Response::GetJson() const
460 {
461 string str = GetString();
462
463 std::unique_ptr<Json::CharReader> reader(Json::CharReaderBuilder().newCharReader());
464 string errors;
465 Json::Value value;
466 if (!reader->parse(str.data(), str.data() + str.size(), &value, &errors))
467 {
468 throw std::runtime_error(std::string("Could not parse JSON: ") + errors.c_str());
469 }
470 return value;
471 }
472
473
474 bool Response::GetJson(Json::Value& value) const noexcept

Callers

nothing calls this directly

Calls 6

newCharReaderMethod · 0.80
c_strMethod · 0.80
GetStringFunction · 0.50
parseMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected