From e5c1498afa1daa8cf3a48af7a74e3b7429afb05d Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Thu, 31 Oct 2024 21:08:25 -0400 Subject: [PATCH] Update proto JSON options call. (#5867) This CL updates the usage of JsonOptions which is deprecated to the newer JsonPrintOptions. --- test/fuzz/fuzz_test_util.cpp | 2 +- tools/fuzz/fuzz.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/fuzz/fuzz_test_util.cpp b/test/fuzz/fuzz_test_util.cpp index 93c9c584d9..b238455dbb 100644 --- a/test/fuzz/fuzz_test_util.cpp +++ b/test/fuzz/fuzz_test_util.cpp @@ -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); diff --git a/tools/fuzz/fuzz.cpp b/tools/fuzz/fuzz.cpp index e671e31eb9..391d338981 100644 --- a/tools/fuzz/fuzz.cpp +++ b/tools/fuzz/fuzz.cpp @@ -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); @@ -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);