This commit is contained in:
Reece Wilson 2022-06-23 16:56:04 +01:00
parent e65b32e9b9
commit f5a1d799c0
4 changed files with 22 additions and 13 deletions

View File

@ -64,7 +64,7 @@ option objc_class_prefix = "GPB";
// foo = any.unpack(Foo.class);
// }
//
// Example 3: Pack and unpack a message in Python.
// Example 3: Pack and unpack a message in Python.
//
// foo = Foo(...)
// any = Any()
@ -74,7 +74,7 @@ option objc_class_prefix = "GPB";
// any.Unpack(foo)
// ...
//
// Example 4: Pack and unpack a message in Go
// Example 4: Pack and unpack a message in Go
//
// foo := &pb.Foo{...}
// any, err := anypb.New(foo)
@ -95,7 +95,7 @@ option objc_class_prefix = "GPB";
//
//
// JSON
// ====
//
// The JSON representation of an `Any` value uses the regular
// representation of the deserialized, embedded message, with an
// additional field `@type` which contains the type URL. Example:

View File

@ -199,7 +199,6 @@ message FieldDescriptorProto {
// For booleans, "true" or "false".
// For strings, contains the default text contents (not escaped in any way).
// For bytes, contains the C escaped value. All bytes >= 128 are escaped.
// TODO(kenton): Base-64 encode?
optional string default_value = 7;
// If set, gives the index of a oneof in the containing type's oneof_decl
@ -604,8 +603,19 @@ message FieldOptions {
// implementation must either *always* check its required fields, or *never*
// check its required fields, regardless of whether or not the message has
// been parsed.
//
// As of 2021, lazy does no correctness checks on the byte stream during
// parsing. This may lead to crashes if and when an invalid byte stream is
// finally parsed upon access.
//
// TODO(b/211906113): Enable validation on lazy fields.
optional bool lazy = 5 [default = false];
// unverified_lazy does no correctness checks on the byte stream. This should
// only be used where lazy with verification is prohibitive for performance
// reasons.
optional bool unverified_lazy = 15 [default = false];
// Is this field deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for accessors, or it will be completely ignored; in the very least, this
@ -730,8 +740,8 @@ message UninterpretedOption {
// The name of the uninterpreted option. Each string represents a segment in
// a dot-separated name. is_extension is true iff a segment represents an
// extension (denoted with parentheses in options specs in .proto files).
// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
// "foo.(bar.baz).qux".
// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
// "foo.(bar.baz).moo".
message NamePart {
required string name_part = 1;
required bool is_extension = 2;
@ -803,8 +813,8 @@ message SourceCodeInfo {
// location.
//
// Each element is a field number or an index. They form a path from
// the root FileDescriptorProto to the place where the definition. For
// example, this path:
// the root FileDescriptorProto to the place where the definition occurs.
// For example, this path:
// [ 4, 3, 2, 7, 1 ]
// refers to:
// file.message_type(3) // 4, 3
@ -858,13 +868,13 @@ message SourceCodeInfo {
// // Comment attached to baz.
// // Another line attached to baz.
//
// // Comment attached to qux.
// // Comment attached to moo.
// //
// // Another line attached to qux.
// optional double qux = 4;
// // Another line attached to moo.
// optional double moo = 4;
//
// // Detached comment for corge. This is not leading or trailing comments
// // to qux or corge because there are blank lines separating it from
// // to moo or corge because there are blank lines separating it from
// // both.
//
// // Detached comment for corge paragraph 2.

View File

@ -48,5 +48,4 @@ option cc_enable_arenas = true;
// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
// }
//
// The JSON representation for `Empty` is empty JSON object `{}`.
message Empty {}

Binary file not shown.