]> git.proxmox.com Git - ceph.git/blame - ceph/src/arrow/cpp/src/arrow/ipc/json_simple.h
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / cpp / src / arrow / ipc / json_simple.h
CommitLineData
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
29namespace arrow {
30
31class Array;
32class DataType;
33
34namespace ipc {
35namespace internal {
36namespace json {
37
38ARROW_EXPORT
39Status ArrayFromJSON(const std::shared_ptr<DataType>&, const std::string& json,
40 std::shared_ptr<Array>* out);
41
42ARROW_EXPORT
43Status ArrayFromJSON(const std::shared_ptr<DataType>&, util::string_view json,
44 std::shared_ptr<Array>* out);
45
46ARROW_EXPORT
47Status ArrayFromJSON(const std::shared_ptr<DataType>&, const char* json,
48 std::shared_ptr<Array>* out);
49
50ARROW_EXPORT
51Status DictArrayFromJSON(const std::shared_ptr<DataType>&, util::string_view indices_json,
52 util::string_view dictionary_json, std::shared_ptr<Array>* out);
53
54ARROW_EXPORT
55Status ScalarFromJSON(const std::shared_ptr<DataType>&, util::string_view json,
56 std::shared_ptr<Scalar>* out);
57
58ARROW_EXPORT
59Status 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