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#ifndef ARROW_IPC_JSON_SIMPLE_H
21#define ARROW_IPC_JSON_SIMPLE_H
22
23#include <memory>
24#include <string>
25
26#include "arrow/status.h"
27#include "arrow/util/string_view.h"
28#include "arrow/util/visibility.h"
29
30namespace arrow {
31
32class Array;
33class DataType;
34
35namespace ipc {
36namespace internal {
37namespace json {
38
39ARROW_EXPORT
40Status ArrayFromJSON(const std::shared_ptr<DataType>&, const std::string& json,
41 std::shared_ptr<Array>* out);
42
43ARROW_EXPORT
44Status ArrayFromJSON(const std::shared_ptr<DataType>&, const util::string_view& json,
45 std::shared_ptr<Array>* out);
46
47ARROW_EXPORT
48Status ArrayFromJSON(const std::shared_ptr<DataType>&, const char* json,
49 std::shared_ptr<Array>* out);
50
51} // namespace json
52} // namespace internal
53} // namespace ipc
54} // namespace arrow
55
56#endif // ARROW_IPC_JSON_SIMPLE_H
57