Hello All,

Quick question on the 'Any' usage (in golang). I have some messages defined 
as below:

message AnyTypeRequest{
  string type = 1;
  google.protobuf.Any req_object = 2;
}
message Type1Msg {
  int32 count =1;
}
message Type2Msg{
  string msg = 1;
}

In the handler I was hoping to switch off the type field to unmarshal the 
req_object into a proper structure.    The call UnmarshalTo() fails with a 
mismatched message type because the Any object's TypeUrl is empty.  Do I 
need to set the Any.TypeUrl to the type I expect it to be, or am I not 
using this in the proper manner?

Thanks,
Chris

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/b8f3d219-b44c-49a3-be72-4d186447f218n%40googlegroups.com.

Reply via email to