On Tuesday, March 15, 2016 at 12:32:07 PM UTC-7, Jeremy Ong wrote:
> Hi google pb,
> I was wondering if an interface exists for specifying that I do not want
> the proto3 serialization or deserialization to discard unknown fields. My
> understanding was that this change was made from proto2 to proto3, and is a
> pretty severe restriction if there are no ways around it. The motivating
> example in my case is to potentially decorate a message with fields in the
> extension ranges that are not part of the message body. The meaning is
> purely semantic and I do not want the data therein to be contained in the
> protobuf format itself. If unknown fields are not an option, are there
> other options or suggestions to handle this?
Some alternatives to consider:
1. use a bytes field to store these data, and decode it manually if it's a
2. use an google.protobuf.Any field for it if the data is still a protobuf
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 email@example.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.