Skip to content

Commit 39c5ec4

Browse files
deploy: 4327d73
1 parent 385510f commit 39c5ec4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

programming-guides/editions/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,8 @@
439439
entries with duplicate keys.</li></ul></li></ul><h2 id=unknowns>Unknown Fields</h2><p>Unknown fields are well-formed protocol buffer serialized data representing
440440
fields that the parser does not recognize. For example, when an old binary
441441
parses data sent by a new binary with new fields, those new fields become
442-
unknown fields in the old binary.</p><p>Editions messages preserve unknown fields and includes them during parsing and
443-
in the serialized output, which matches proto2 and proto3 behavior.</p><h3 id=retaining>Retaining Unknown Fields</h3><p>Some actions can cause unknown fields to be lost. For example, if you do one of
442+
unknown fields in the old binary.</p><p>Editions messages preserve unknown fields and include them during parsing and in
443+
the serialized output, which matches proto2 and proto3 behavior.</p><h3 id=retaining>Retaining Unknown Fields</h3><p>Some actions can cause unknown fields to be lost. For example, if you do one of
444444
the following, unknown fields are lost:</p><ul><li>Serialize a proto to JSON.</li><li>Iterate over all of the fields in a message to populate a new message.</li></ul><p>To avoid losing unknown fields, do the following:</p><ul><li>Use binary; avoid using text formats for data exchange.</li><li>Use message-oriented APIs, such as <code>CopyFrom()</code> and <code>MergeFrom()</code>, to copy data
445445
rather than copying field-by-field</li></ul><p>TextFormat is a bit of a special case. Serializing to TextFormat prints unknown
446446
fields using their field numbers. But parsing TextFormat data back into a binary

programming-guides/proto3/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@
473473
entries with duplicate keys.</li></ul></li></ul><h2 id=unknowns>Unknown Fields</h2><p>Unknown fields are well-formed protocol buffer serialized data representing
474474
fields that the parser does not recognize. For example, when an old binary
475475
parses data sent by a new binary with new fields, those new fields become
476-
unknown fields in the old binary.</p><p>Proto3 messages preserve unknown fields and includes them during parsing and in
476+
unknown fields in the old binary.</p><p>Proto3 messages preserve unknown fields and include them during parsing and in
477477
the serialized output, which matches proto2 behavior.</p><h3 id=retaining>Retaining Unknown Fields</h3><p>Some actions can cause unknown fields to be lost. For example, if you do one of
478478
the following, unknown fields are lost:</p><ul><li>Serialize a proto to JSON.</li><li>Iterate over all of the fields in a message to populate a new message.</li></ul><p>To avoid losing unknown fields, do the following:</p><ul><li>Use binary; avoid using text formats for data exchange.</li><li>Use message-oriented APIs, such as <code>CopyFrom()</code> and <code>MergeFrom()</code>, to copy data
479479
rather than copying field-by-field</li></ul><p>TextFormat is a bit of a special case. Serializing to TextFormat prints unknown

0 commit comments

Comments
 (0)