| 105 | } |
| 106 | |
| 107 | absl::Status ParsedMessageValue::ConvertToJson( |
| 108 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 109 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 110 | google::protobuf::Message* absl_nonnull json) const { |
| 111 | ABSL_DCHECK(descriptor_pool != nullptr); |
| 112 | ABSL_DCHECK(message_factory != nullptr); |
| 113 | ABSL_DCHECK(json != nullptr); |
| 114 | ABSL_DCHECK_EQ(json->GetDescriptor()->well_known_type(), |
| 115 | google::protobuf::Descriptor::WELLKNOWNTYPE_VALUE); |
| 116 | |
| 117 | ValueReflection value_reflection; |
| 118 | CEL_RETURN_IF_ERROR(value_reflection.Initialize(json->GetDescriptor())); |
| 119 | google::protobuf::Message* json_object = value_reflection.MutableStructValue(json); |
| 120 | |
| 121 | return internal::MessageToJson(*value_, descriptor_pool, message_factory, |
| 122 | json_object); |
| 123 | } |
| 124 | |
| 125 | absl::Status ParsedMessageValue::ConvertToJsonObject( |
| 126 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
nothing calls this directly
no test coverage detected