aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/any.proto
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/any.proto')
-rw-r--r--src/google/protobuf/any.proto16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/google/protobuf/any.proto b/src/google/protobuf/any.proto
index 45db6ede..81dcf46c 100644
--- a/src/google/protobuf/any.proto
+++ b/src/google/protobuf/any.proto
@@ -65,6 +65,16 @@ option objc_class_prefix = "GPB";
// foo = any.unpack(Foo.class);
// }
//
+// Example 3: Pack and unpack a message in Python.
+//
+// foo = Foo(...)
+// any = Any()
+// any.Pack(foo)
+// ...
+// if any.Is(Foo.DESCRIPTOR):
+// any.Unpack(foo)
+// ...
+//
// The pack methods provided by protobuf library will by default use
// 'type.googleapis.com/full.type.name' as the type URL and the unpack
// methods only use the fully qualified type name after the last '/'
@@ -104,10 +114,10 @@ message Any {
// A URL/resource name whose content describes the type of the
// serialized protocol buffer message.
//
- // For URLs which use the schema `http`, `https`, or no schema, the
+ // For URLs which use the scheme `http`, `https`, or no scheme, the
// following restrictions and interpretations apply:
//
- // * If no schema is provided, `https` is assumed.
+ // * If no scheme is provided, `https` is assumed.
// * The last segment of the URL's path must represent the fully
// qualified name of the type (as in `path/google.protobuf.Duration`).
// The name should be in a canonical form (e.g., leading "." is
@@ -120,7 +130,7 @@ message Any {
// on changes to types. (Use versioned type names to manage
// breaking changes.)
//
- // Schemas other than `http`, `https` (or the empty schema) might be
+ // Schemes other than `http`, `https` (or the empty scheme) might be
// used with implementation specific semantics.
//
string type_url = 1;