Update proto JSON options call. (#5867)

This CL updates the usage of JsonOptions which is deprecated to the newer
JsonPrintOptions.
This commit is contained in:
dan sinclair 2024-10-31 21:08:25 -04:00 committed by GitHub
parent 5f1e86cb55
commit e5c1498afa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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);