1 // Protocol Buffers - Google's data interchange format 2 // Copyright 2008 Google Inc. All rights reserved. 3 // 4 // Use of this source code is governed by a BSD-style 5 // license that can be found in the LICENSE file or at 6 // https://developers.google.com/open-source/licenses/bsd 7 8 #ifndef GOOGLE_PROTOBUF_JSON_INTERNAL_UNPARSER_H__ 9 #define GOOGLE_PROTOBUF_JSON_INTERNAL_UNPARSER_H__ 10 11 #include <string> 12 13 #include "absl/strings/string_view.h" 14 #include "google/protobuf/json/internal/writer.h" 15 #include "google/protobuf/message.h" 16 #include "google/protobuf/util/type_resolver.h" 17 18 namespace google { 19 namespace protobuf { 20 namespace json_internal { 21 // Internal version of google::protobuf::util::MessageToJsonString; see json_util.h for 22 // details. 23 absl::Status MessageToJsonString(const Message& message, std::string* output, 24 json_internal::WriterOptions options); 25 // Internal version of google::protobuf::util::BinaryToJsonStream; see json_util.h for 26 // details. 27 absl::Status BinaryToJsonStream(google::protobuf::util::TypeResolver* resolver, 28 const std::string& type_url, 29 io::ZeroCopyInputStream* binary_input, 30 io::ZeroCopyOutputStream* json_output, 31 json_internal::WriterOptions options); 32 } // namespace json_internal 33 } // namespace protobuf 34 } // namespace google 35 36 #endif // GOOGLE_PROTOBUF_JSON_INTERNAL_UNPARSER_H__ 37