On Wed, Sep 9, 2015 at 10:03 PM, Zhihua Wen <[email protected]> wrote:

> Protocol buffer 3 does support map, but does it support nested maps?
>
> I got an error like "test.proto:x:y: Expected ">"." while trying to
> compile the following proto, is it intentional?
>
> message test {
>   map<string, int64> field1 = 1;
>   map<string, map<string, int64>> field2 = 2;
> }
>
Nested map is not supported. You will need to wrap the inner map with a
message type. I.e.:

message Test {
  message InnerMap {
    map<string, int64> value = 1;
  }
  map<string, InnerMap> field2 = 2;
}




>
> --
> 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 post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to