wasphin commented on a change in pull request #1604:
URL: https://github.com/apache/incubator-brpc/pull/1604#discussion_r836472422
##########
File path: src/json2pb/pb_to_json.cpp
##########
@@ -40,15 +40,17 @@ Pb2JsonOptions::Pb2JsonOptions()
, bytes_to_base64(true)
#endif
, jsonify_empty_array(false)
- , always_print_primitive_fields(false) {
+ , always_print_primitive_fields(false)
+ , single_repeated_to_array(false) {
}
class PbToJsonConverter {
public:
explicit PbToJsonConverter(const Pb2JsonOptions& opt) : _option(opt) {}
template <typename Handler>
- bool Convert(const google::protobuf::Message& message, Handler& handler);
+ bool Convert(const google::protobuf::Message& message, Handler& handler,
+ const Pb2JsonOptions* options = nullptr);
Review comment:
当时是为了区分是否为根对象, 是有点不合适.
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]