| 107 | |
| 108 | template <typename Vector> |
| 109 | absl::Status ListValueToJson( |
| 110 | const Vector& vector, |
| 111 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 112 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 113 | google::protobuf::Message* absl_nonnull json) { |
| 114 | ABSL_DCHECK(descriptor_pool != nullptr); |
| 115 | ABSL_DCHECK(message_factory != nullptr); |
| 116 | ABSL_DCHECK(json != nullptr); |
| 117 | ABSL_DCHECK_EQ(json->GetDescriptor()->well_known_type(), |
| 118 | google::protobuf::Descriptor::WELLKNOWNTYPE_VALUE); |
| 119 | |
| 120 | ValueReflection reflection; |
| 121 | CEL_RETURN_IF_ERROR(reflection.Initialize(json->GetDescriptor())); |
| 122 | return ListValueToJsonArray(vector, descriptor_pool, message_factory, |
| 123 | reflection.MutableListValue(json)); |
| 124 | } |
| 125 | |
| 126 | class CompatListValueImplIterator final : public ValueIterator { |
| 127 | public: |
nothing calls this directly
no test coverage detected