You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ext/descriptor/README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,12 @@ Usage
10
10
var protobuf =require("protobufjs"),
11
11
descriptor =require("protobufjs/ext/descriptor");
12
12
13
-
var descriptor =...; // either a FieldDescriptorSet buffer or JSON object
13
+
var descriptor =...; // either a FieldDescriptorSet buffer, a FieldDescriptorSet message instance or a corresponding valid JSON object
14
14
var root =protobuf.Root.fromDescriptor(descriptor);
15
15
var rootDescriptor =root.toDescriptor("proto3");
16
16
```
17
17
18
18
API
19
19
---
20
20
21
-
The extension adds `.fromDescriptor(descriptor[, syntax])` and `#toDescriptor([syntax])` methods to reflection objects and exports the internally used `Root` instance that contains the types present in descriptor.proto.
21
+
The extension adds `.fromDescriptor(descriptor[, syntax])` and `#toDescriptor([syntax])` methods to reflection objects and exports the `.google.protobuf` namespace of the internally used `Root` instance containing the types present in descriptor.proto.
0 commit comments