Re: [protobuf] Guid conventions

2017-12-08 Thread Marc Gravell
One thought on the bytes vs string aspect: as shown in the SO question, it isn't beyond imagining to want to use a guid/uuid with "map" - which wouldn't be possible with (raw) bytes. As an additional consideration for bytes : there are at least two binary representations of guid/uuid - i.e. which

Re: [protobuf] Guid conventions

2017-12-07 Thread 'Adam Cozzette' via Protocol Buffers
I haven't had to store a GUID/UUID in a proto before but it seems like string or bytes would be the best choice. You would definitely want to use bytes (not string) if you're using the binary representation, since string fields are for UTF-8 only. We could consider eventually creating a well-known

[protobuf] Guid conventions

2017-12-06 Thread Marc Gravell
A question on Stack Overflow earlier ( https://stackoverflow.com/questions/47674930/google-protobuf-proto-file-query/4767629) reminded me that I'm not fully "up" on the conventions for using guids in protobuf. There's no primitive / keyword for them, and AFAIK no "well known type". So : how do