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

Function ExampleJson

cpp/src/arrow/extension/json_test.cc:34–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32class TestJsonExtensionType : public ::testing::Test {};
33
34std::shared_ptr<Array> ExampleJson(const std::shared_ptr<DataType>& storage_type) {
35 std::shared_ptr<Array> arr = ArrayFromJSON(storage_type, R"([
36 "null",
37 "1234",
38 "3.14159",
39 "true",
40 "false",
41 "\"a json string\"",
42 "[\"a\", \"json\", \"array\"]",
43 "{\"obj\": \"a simple json object\"}"
44 ])");
45 return ExtensionType::WrapArray(arrow::extension::json(storage_type), arr);
46}
47
48TEST_F(TestJsonExtensionType, JsonRoundtrip) {
49 for (const auto& storage_type : {utf8(), large_utf8(), utf8_view()}) {

Callers 1

TEST_FFunction · 0.85

Calls 2

ArrayFromJSONFunction · 0.85
jsonFunction · 0.85

Tested by

no test coverage detected