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

Function ExampleJson

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

Source from the content-addressed store, hash-verified

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