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_PARSER_H__ 9 #define GOOGLE_PROTOBUF_JSON_INTERNAL_PARSER_H__ 10 11 #include <string> 12 13 #include "google/protobuf/json/internal/lexer.h" 14 #include "google/protobuf/message.h" 15 #include "google/protobuf/util/type_resolver.h" 16 17 namespace google { 18 namespace protobuf { 19 namespace json_internal { 20 // Internal version of google::protobuf::util::JsonStreamToMessage; see json_util.h for 21 // details. 22 absl::Status JsonStreamToMessage(io::ZeroCopyInputStream* input, 23 Message* message, 24 json_internal::ParseOptions options); 25 // Internal version of google::protobuf::util::JsonToBinaryStream; see json_util.h for 26 // details. 27 absl::Status JsonToBinaryStream(google::protobuf::util::TypeResolver* resolver, 28 const std::string& type_url, 29 io::ZeroCopyInputStream* json_input, 30 io::ZeroCopyOutputStream* binary_output, 31 json_internal::ParseOptions options); 32 } // namespace json_internal 33 } // namespace protobuf 34 } // namespace google 35 36 #endif // GOOGLE_PROTOBUF_JSON_INTERNAL_PARSER_H__ 37