aboutsummaryrefslogtreecommitdiff
path: root/osp_base/json/json_reader.h
diff options
context:
space:
mode:
Diffstat (limited to 'osp_base/json/json_reader.h')
-rw-r--r--osp_base/json/json_reader.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/osp_base/json/json_reader.h b/osp_base/json/json_reader.h
new file mode 100644
index 00000000..be4a5e06
--- /dev/null
+++ b/osp_base/json/json_reader.h
@@ -0,0 +1,33 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef OSP_BASE_JSON_JSON_READER_H_
+#define OSP_BASE_JSON_JSON_READER_H_
+
+#include <memory>
+
+#include "absl/strings/string_view.h"
+#include "json/reader.h"
+
+namespace Json {
+class Value;
+}
+
+namespace openscreen {
+template <typename T>
+class ErrorOr;
+
+class JsonReader {
+ public:
+ JsonReader();
+
+ ErrorOr<Json::Value> Read(absl::string_view document);
+
+ private:
+ Json::CharReaderBuilder builder_;
+};
+
+} // namespace openscreen
+
+#endif // OSP_BASE_JSON_JSON_READER_H_ \ No newline at end of file