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

Function CheckJsonValid

cpp/src/parquet/reader_test.cc:1232–1242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1230namespace {
1231
1232::arrow::Status CheckJsonValid(std::string_view json_string) {
1233 rj::Document json_doc;
1234 constexpr auto kParseFlags = rj::kParseFullPrecisionFlag | rj::kParseNanAndInfFlag;
1235 json_doc.Parse<kParseFlags>(json_string.data(), json_string.length());
1236 if (json_doc.HasParseError()) {
1237 return ::arrow::Status::Invalid("JSON parse error at offset ",
1238 json_doc.GetErrorOffset(), ": ",
1239 rj::GetParseError_En(json_doc.GetParseError()));
1240 }
1241 return ::arrow::Status::OK();
1242}
1243
1244} // namespace
1245

Callers 2

TEST_FFunction · 0.85
TESTFunction · 0.85

Calls 4

InvalidFunction · 0.50
OKFunction · 0.50
dataMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected