|
1 | 1 | +++ |
2 | 2 | title = "Proto Best Practices" |
3 | 3 | weight = 90 |
4 | | -description = "Shares vetted best practices for authoring Protocol Buffers." |
| 4 | +description = "Shares vetted best practices for authoring Protobuf schemas." |
5 | 5 | type = "docs" |
6 | 6 | aliases = "/programming-guides/dos-donts" |
7 | 7 | +++ |
@@ -71,7 +71,7 @@ To safely remove the original name (if it's being used for interchange, which it |
71 | 71 |
|
72 | 72 | Almost never change the type of a field; it'll mess up deserialization, same as |
73 | 73 | re-using a tag number. The |
74 | | -[protobuf docs](/programming-guides/editions#updating) |
| 74 | +[Protobuf docs](/programming-guides/editions#updating) |
75 | 75 | outline cases where old binary encoded data may successfully parse under a |
76 | 76 | different type (for example, going between `int32`, `uint32`, `int64` and |
77 | 77 | `bool`). However, changing a field's type can be difficult to roll out safely |
@@ -191,9 +191,9 @@ when a perfectly suitable common type already exists! |
191 | 191 | is a color in the RGBA color space. |
192 | 192 |
|
193 | 193 | **Note:** While the "Well-Known Types" (such as `Duration` and `Timestamp`) are |
194 | | -included with the Protocol Buffers compiler, the "Common Types" (such as `Date` |
195 | | -and `Money`) are not. To use the Common Types, you may need to add a dependency |
196 | | -on the [googleapis repository](https://github.com/googleapis/googleapis). |
| 194 | +included with the Protobuf compiler, the "Common Types" (such as `Date` and |
| 195 | +`Money`) are not. To use the Common Types, you may need to add a dependency on |
| 196 | +the [googleapis repository](https://github.com/googleapis/googleapis). |
197 | 197 |
|
198 | 198 | <a id="do-define-widely-used-message-types-in-separate-files"></a> |
199 | 199 |
|
@@ -279,7 +279,7 @@ For example: |
279 | 279 |
|
280 | 280 | Text-based serialization formats like text format and |
281 | 281 | JSON represent fields and enum values as strings. As a result, deserialization |
282 | | -of protocol buffers in these formats using old code will fail when a field or |
| 282 | +of Protobuf messages in these formats using old code will fail when a field or |
283 | 283 | enum value is renamed, or when a new field or enum value or extension is added. |
284 | 284 | Use binary serialization when possible for data interchange, and use text format |
285 | 285 | for human editing and debugging only. |
@@ -341,7 +341,7 @@ overrides are possible. |
341 | 341 | ## Avoid Using Language Keywords for Field Names {#avoid-keywords} |
342 | 342 |
|
343 | 343 | If the name of a message, field, enum, or enum value is a keyword in the |
344 | | -language that reads from/writes to that field, then protobuf may change the |
| 344 | +language that reads from/writes to that field, then Protobuf may change the |
345 | 345 | field name, and may have different ways to access them than normal fields. For |
346 | 346 | example, see |
347 | 347 | [this warning about Python](/reference/python/python-generated#keyword-conflicts). |
|
0 commit comments