In protocol buffers is there a way to have a message with collection of nested messages? For example a message Supervisor might have a collection of Employees along with the name and department of the supervisor.
+2
A:
Yes. You use repeated
fields;
message Employee
{
...
}
message Supervisor
{
repeated Employee employees = 1;
}
You can then access the employees
field as a list.
JesperE
2010-01-23 09:04:32