Skip to content

Commit

Permalink
Samples: Make compatible with Protobuf >= 3.22.0
Browse files Browse the repository at this point in the history
  • Loading branch information
KerstinKeller committed Aug 3, 2023
1 parent 76dadd6 commit 2b551bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/cpp/services/ping_client_dyn/src/proto_json_conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ std::string GetSerialzedMessageFromJSON(google::protobuf::Message* msg_proto_, c
}

// read JSON string into message object
google::protobuf::util::Status status = google::protobuf::util::JsonStringToMessage(msg_json_, msg_proto_);
auto status = google::protobuf::util::JsonStringToMessage(msg_json_, msg_proto_);
if (!status.ok())
{
std::cerr << "Could not convert JSON to google message." << std::endl;
Expand All @@ -60,7 +60,7 @@ std::string GetJSONFromSerialzedMessage(google::protobuf::Message* msg_proto_, c

// convert message object to JSON string
std::string msg_json;
google::protobuf::util::Status status = google::protobuf::util::MessageToJsonString(*msg_proto_, &msg_json);
auto status = google::protobuf::util::MessageToJsonString(*msg_proto_, &msg_json);
if (!status.ok())
{
std::cerr << "Could not convert google message to JSON." << std::endl;
Expand Down

0 comments on commit 2b551bf

Please sign in to comment.