3 ms·
Minor nit, but not necessarily. For basically all values of SomeMessage, dec should fail to parse due to improperly encoded UTF8 data for field 2 (modulo some p
by dweis 7y ago
Minor nit, but not necessarily. For basically all values of SomeMessage, dec should fail to parse due to improperly encoded UTF8 data for field 2 (modulo some proto2 vs. proto3 and language binding implementation differences).
Change field 2 to a bytes field instead of a string field and then yes.
- shereadsthenews 7y agoTrue but UTF8 enforcements was quite absent in all implementations until proto3, and the empty string would be a special case.
- shereadsthenews 7y agoI should mention that I consider this a feature not a bug. The isomorphism permits an endpoint to use ‘bytes submessage_i_dont_need_to_decode’ to cheaply handle nested message structures that need to be preserved but not inspected, such as in a proxy application.