Skip to content

Commit

Permalink
Update proto JSON options call. (#5867)
Browse files Browse the repository at this point in the history
This CL updates the usage of JsonOptions which is deprecated to the newer
JsonPrintOptions.
  • Loading branch information
dj2 authored Nov 1, 2024
1 parent 5f1e86c commit e5c1498
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/fuzz/fuzz_test_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void DumpTransformationsJson(
const protobufs::TransformationSequence& transformations,
const char* filename) {
std::string json_string;
auto json_options = google::protobuf::util::JsonOptions();
auto json_options = google::protobuf::util::JsonPrintOptions();
json_options.add_whitespace = true;
auto json_generation_status = google::protobuf::util::MessageToJsonString(
transformations, &json_string, json_options);
Expand Down
4 changes: 2 additions & 2 deletions tools/fuzz/fuzz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ void DumpTransformationsJson(
const spvtools::fuzz::protobufs::TransformationSequence& transformations,
const char* filename) {
std::string json_string;
auto json_options = google::protobuf::util::JsonOptions();
auto json_options = google::protobuf::util::JsonPrintOptions();
json_options.add_whitespace = true;
auto json_generation_status = google::protobuf::util::MessageToJsonString(
transformations, &json_string, json_options);
Expand Down Expand Up @@ -800,7 +800,7 @@ int main(int argc, const char** argv) {
}

std::string json_string;
auto json_options = google::protobuf::util::JsonOptions();
auto json_options = google::protobuf::util::JsonPrintOptions();
json_options.add_whitespace = true;
auto json_generation_status = google::protobuf::util::MessageToJsonString(
transformations_applied, &json_string, json_options);
Expand Down

0 comments on commit e5c1498

Please sign in to comment.