Skip to content

Commit f7f2f2a

Browse files
committed
Comment
1 parent 77b40a7 commit f7f2f2a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Grpc/JsonTranscoding/src/Microsoft.AspNetCore.Grpc.JsonTranscoding/Internal/Json/MessageTypeInfoResolver.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ private JsonPropertyInfo CreatePropertyInfo(JsonTypeInfo typeInfo, string name,
9595

9696
// A property with a wrapper type is usually the underlying type on the DTO.
9797
// For example, a field of type google.protobuf.StringValue will have a property of type string.
98-
// Sometimes the wrapper type is exposed so we need to do some extra work to translate the value.
98+
// However, the wrapper type is exposed if someone manually creates a DTO with it, or there is a problem
99+
// detecting wrapper type in code generation. For example, https://github.com/protocolbuffers/protobuf/issues/22744
99100
FieldDescriptor? wrapperTypeValueField = null;
100101
if (field.FieldType == FieldType.Message && ServiceDescriptorHelpers.IsWrapperType(field.MessageType))
101102
{

0 commit comments

Comments
 (0)