Given a message (b of type B), nested in another (a of type A); how does one get ‘a’? I was hoping for something like ‘b.getParent()’.
message B { optional string name = 1; repeated B b = 2; }
message A { optional string name = 1; repeated B b = 1; }
Here is an example instance of an ‘a’ with textual serialization.
name: "a"
b { name: “foo”
b { name: “fred”
b { name: “flintstone” }}}
b { name: “bar” }
b { name: “baz” }
The issue is that I am navigating the collection 'a' with a visitor and I need to be able to reconstruct a full name composed of names of all the ancestors.
Refs:
I am fine with internal representation as I will wrap it in a kotlin extension.