compound message allows colon

14 views
Skip to first unread message

naderp

unread,
Feb 18, 2011, 10:53:19 AM2/18/11
to Protocol Buffers
Hi,

Given the following .proto definition:

message person {
required string name = 1;
required int32 id = 2;
}

I noticed the following message syntax is valid:

person: {
name: "fred"
id: 3
}

i.e., the generated parser will quite happily accept a colon after the
compound message name (person: in this case).

Is this a bug or a "feature"?

Cheers

Kenton Varda

unread,
Feb 22, 2011, 12:16:08 PM2/22/11
to naderp, Protocol Buffers
It's a "feature".  This has always been allowed.  No one really knows why.


--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To post to this group, send email to prot...@googlegroups.com.
To unsubscribe from this group, send email to protobuf+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.


Reply all
Reply to author
Forward
0 new messages