Protocol Buffer Wrappers returning single character

18 views
Skip to first unread message

SW89

unread,
Nov 5, 2019, 3:55:47 PM11/5/19
to Protocol Buffers
Good Afternoon, 

My team is working to implement Protobuf into our angular/C# web application however we have run into a snag regarding the implementation of wrapper types. 

We needed to support the notion of null values and came across the implementation of wrappers to facilitate this with protobuf. We have implemented all our non required fields using wrappers and what we have seen is that values encapsulated within the Wrappers are only returning a single character when inspected server side. 

For Example we have a form input in which we enter Name = "Test Name" and then when inspecting the server side values all Name is holding is "T".

Has anyone encountered this issue and could shed some light on how to fix it.

Thanks,

Sam



 

Marc Gravell

unread,
Nov 5, 2019, 4:20:44 PM11/5/19
to SW89, Protocol Buffers
Can you show what you mean by wrappers here? If you dump the payload and inspect it (protoc, or there's a tool at https://protogen.marcgravell.com/decode), is the data in the payload? A minimal example, in some way, would really help

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/45b6bfbe-e20b-427d-8bab-26197cfe4293%40googlegroups.com.

SW89

unread,
Nov 5, 2019, 4:29:08 PM11/5/19
to Protocol Buffers
syntax = "proto3";

import "google/protobuf/wrappers.proto";

message Test {

 google
.protobuf.StringValue name = 1;
}


Reply all
Reply to author
Forward
0 new messages