|
|
@ -56,7 +56,8 @@ void VaidateProtoJsonTranslation(const std::string& json_str) { |
|
|
|
// We usually do not want this to be true, however it can be helpful to
|
|
|
|
// We usually do not want this to be true, however it can be helpful to
|
|
|
|
// uncomment and see the output produced then all fields are printed.
|
|
|
|
// uncomment and see the output produced then all fields are printed.
|
|
|
|
// print_options.always_print_primitive_fields = true;
|
|
|
|
// print_options.always_print_primitive_fields = true;
|
|
|
|
s = grpc::protobuf::json::MessageToJsonString(msg, &proto_json_str); |
|
|
|
s = grpc::protobuf::json::MessageToJsonString(msg, &proto_json_str, |
|
|
|
|
|
|
|
print_options); |
|
|
|
EXPECT_TRUE(s.ok()); |
|
|
|
EXPECT_TRUE(s.ok()); |
|
|
|
// Parse JSON and re-dump to string, to make sure formatting is the
|
|
|
|
// Parse JSON and re-dump to string, to make sure formatting is the
|
|
|
|
// same as what would be generated by our JSON library.
|
|
|
|
// same as what would be generated by our JSON library.
|
|
|
|