]>
Commit | Line | Data |
---|---|---|
1d09f67e TL |
1 | // Licensed to the Apache Software Foundation (ASF) under one |
2 | // or more contributor license agreements. See the NOTICE file | |
3 | // distributed with this work for additional information | |
4 | // regarding copyright ownership. The ASF licenses this file | |
5 | // to you under the Apache License, Version 2.0 (the | |
6 | // "License"); you may not use this file except in compliance | |
7 | // with the License. You may obtain a copy of the License at | |
8 | // | |
9 | // http://www.apache.org/licenses/LICENSE-2.0 | |
10 | // | |
11 | // Unless required by applicable law or agreed to in writing, | |
12 | // software distributed under the License is distributed on an | |
13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
14 | // KIND, either express or implied. See the License for the | |
15 | // specific language governing permissions and limitations | |
16 | // under the License. | |
17 | ||
18 | // Implement a simple JSON representation format for arrays | |
19 | ||
20 | #pragma once | |
21 | ||
22 | #include <memory> | |
23 | #include <string> | |
24 | ||
25 | #include "arrow/status.h" | |
26 | #include "arrow/util/string_view.h" | |
27 | #include "arrow/util/visibility.h" | |
28 | ||
29 | namespace arrow { | |
30 | ||
31 | class Array; | |
32 | class DataType; | |
33 | ||
34 | namespace ipc { | |
35 | namespace internal { | |
36 | namespace json { | |
37 | ||
38 | ARROW_EXPORT | |
39 | Status ArrayFromJSON(const std::shared_ptr<DataType>&, const std::string& json, | |
40 | std::shared_ptr<Array>* out); | |
41 | ||
42 | ARROW_EXPORT | |
43 | Status ArrayFromJSON(const std::shared_ptr<DataType>&, util::string_view json, | |
44 | std::shared_ptr<Array>* out); | |
45 | ||
46 | ARROW_EXPORT | |
47 | Status ArrayFromJSON(const std::shared_ptr<DataType>&, const char* json, | |
48 | std::shared_ptr<Array>* out); | |
49 | ||
50 | ARROW_EXPORT | |
51 | Status DictArrayFromJSON(const std::shared_ptr<DataType>&, util::string_view indices_json, | |
52 | util::string_view dictionary_json, std::shared_ptr<Array>* out); | |
53 | ||
54 | ARROW_EXPORT | |
55 | Status ScalarFromJSON(const std::shared_ptr<DataType>&, util::string_view json, | |
56 | std::shared_ptr<Scalar>* out); | |
57 | ||
58 | ARROW_EXPORT | |
59 | Status DictScalarFromJSON(const std::shared_ptr<DataType>&, util::string_view index_json, | |
60 | util::string_view dictionary_json, | |
61 | std::shared_ptr<Scalar>* out); | |
62 | ||
63 | } // namespace json | |
64 | } // namespace internal | |
65 | } // namespace ipc | |
66 | } // namespace arrow |