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.
Yes. You use repeated
fields;
message Employee
{
...
}
message Supervisor
{
repeated Employee employees = 1;
}
You can then access the employees
field as a list.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With