I know that the Any type is nothing but a byte array (for data) and string field (type url). I would like to know how the packing of byte array in ‘Any’ type takes place. Lets say, I have a protobuf message ‘m1’ in .proto file. in C++ if I :
-
set the values in
m1 *obj = new m1().
-
serialize in byte array (of ‘a’).
Will it be equivalent to (leaving aside the url type):
Any* any = new Any();
any->PackFrom(*m1);
?