MCPcopy Create free account
hub / github.com/apache/arrow / Parse

Method Parse

cpp/src/arrow/json/object_parser.cc:31–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29class ObjectParser::Impl {
30 public:
31 Status Parse(std::string_view json) {
32 document_.Parse(reinterpret_cast<const rj::Document::Ch*>(json.data()),
33 static_cast<size_t>(json.size()));
34
35 if (document_.HasParseError()) {
36 return Status::Invalid("Json parse error (offset ", document_.GetErrorOffset(),
37 "): ", document_.GetParseError());
38 }
39 if (!document_.IsObject()) {
40 return Status::TypeError("Not a json object");
41 }
42 return Status::OK();
43 }
44
45 Result<std::string> GetString(const char* key) const {
46 if (!document_.HasMember(key)) {

Callers

nothing calls this directly

Calls 6

OKFunction · 0.70
InvalidFunction · 0.50
TypeErrorFunction · 0.50
ParseMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected