ipfs-chromium
chromium_json_adapter.h
1 #ifndef IPFS_CHROMIUM_JSON_ADAPTER_H_
2 #define IPFS_CHROMIUM_JSON_ADAPTER_H_
3 
4 #include <base/values.h>
5 #include <ipfs_client/dag_json_value.h>
6 
7 namespace ipfs {
8 class ChromiumJsonAdapter final : public ipfs::DagJsonValue {
9  base::Value data_;
10  std::string pretty_print() const override;
11  std::unique_ptr<DagJsonValue> operator[](std::string_view) const override;
12  std::optional<std::string> get_if_string() const override;
13  std::optional<std::vector<std::string>> object_keys() const override;
14  bool iterate_list(std::function<void(DagJsonValue const&)>) const override;
15 
16  public:
17  ChromiumJsonAdapter(base::Value);
18  ~ChromiumJsonAdapter() noexcept override;
19 };
20 } // namespace ipfs
21 
22 #endif // IPFS_CHROMIUM_JSON_ADAPTER_H_
Definition: chromium_json_adapter.h:8
Definition: dag_json_value.h:15