Updates:
        Status: WorkingAsIntended

Comment #1 on issue 229 by ken...@google.com: TextFormat should have option to silently ignore unknown fields
http://code.google.com/p/protobuf/issues/detail?id=229

This has come up before.  Copied from a previous answer:

Text format is designed for communicating with people whereas binary format is for communicating with machines. People make mistakes, like spelling errors. These mistakes should be caught, not silently ignored. Therefore, text format is NOT designed with the same forward- and backward-compatibility properties as the binary format, and should not be used when such compatibility is desired.

If you find yourself wanting to ignore unknown fields when parsing a text-format message, most likely you should be using binary format instead. One common use case of this is config files that are distributed to production machines where some of those machines may be older and not know about newly-added fields. In this case, what you should do is distribute these configs as binary messages. You can still edit them in text format, but then you should invoke protoc with --encode to produce a binary file for distribution. Since you give protoc the newest version of the .proto file, it will not need to ignore any fields. Remember that you can always use protoc --decode to convert back to text.

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

Reply via email to