On Wed, Sep 30, 2015 at 3:32 PM, SashiM <mail.to.sa...@gmail.com> wrote:
> We have been using the v3.0.0-alpha-3 library, and notice that the wire
> format for serializing maps slightly changed in the v3.0.0-beta-1 version.
> But the code using beta library is able to parse the messages serialized
> using the alpha version. So, no big issues there. We just have to be
> careful about using SerializeToString() for comparing two protobufs for
> equality (and use the MessageDifferencer instead).
> Could you confirm if the wire format change is limited to maps.
It might not be intentional but there could be two possible changes to
maps' wireformat: 1. whether 0 values are serialized, 2. the order of
serialized elements. Both will affect the serialized bytes. They should not
affect the actual value of the proto though. No matter which case it is all
parsers must be able to parse the serialized result and produce the same
parsed proto. I'm not aware of any other changes that could affect
Note that comparing proto serialized bytes is fragile especially after the
introduction of maps because protobuf maps are unordered and the same
content can yield different bytes even within the same process.
> Also, will the code linked using alpha version be able to parse a string
> that was generated by the beta version (In case of old code parsing the new
> serialized strings). We are using C++, and using maps with proto2 format
> 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 protobuf+unsubscr...@googlegroups.com.
> To post to this group, send email to email@example.com.
> 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 post to this group, send email to firstname.lastname@example.org.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.