ipfs-chromium
Loading...
Searching...
No Matches
dag_json_value.h
1#ifndef IPFS_DAG_JSON_VALUE_H_
2#define IPFS_DAG_JSON_VALUE_H_
3
4#include <ipfs_client/cid.h>
5
6#include <functional>
7#include <memory>
8#include <optional>
9#include <string>
10#include <string_view>
11
12namespace ipfs {
16 public:
17 virtual std::string pretty_print() const = 0;
18 virtual std::unique_ptr<DagJsonValue> operator[](std::string_view) const = 0;
19 virtual std::optional<std::string> get_if_string() const = 0;
20 virtual std::optional<std::vector<std::string>> object_keys() const = 0;
21 virtual bool iterate_list(std::function<void(DagJsonValue const&)>) const = 0;
22 virtual ~DagJsonValue() noexcept;
23
24 std::optional<Cid> get_if_link() const;
25};
26} // namespace ipfs
27
28#endif // IPFS_DAG_JSON_VALUE_H_
Definition dag_json_value.h:15