-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: allow transformations between descriptor.proto objects and reflection objects #757
Comments
That's basically self-describing messages-support, right? |
Not really. The types in |
To my understanding, Only a I might just be misunderstanding your use-case, though, so feel free to point me into the right direction. |
Right, |
I quickly put something together as a starting point, see commit above. The reason why I'd prefer an extension here is that it's usually not necessary to include the entire descriptor (functionality) as part of the standard library. Idea is that doing |
That looks like what I was asking for. |
Sigh, this will take a while. Added a few comments to document what's (still) necessary. |
…escriptor.proto (experimental), see #757
…re when throwing descriptor.proto itself at it, see #757
Still pretty rough around the edges, but it's now able to convert a root with loaded descriptor.proto in it to a FileDescriptorSet, encode it, decode it back and have it return something similar (still needs a real test suite) to the descriptor we initially put in. Wheee... |
protobuf.js version: 6
It would be useful to be able to take a message of a type defined in
google/protobuf/descriptor.proto
, and convert it into the corresponding reflection object, and also be able to convert the other way. Of course, some of them don't really make sense, but I would like, for example, to be able toload
aDescriptorProto
message instance as aMessage
object, and conversely to be able to extract aDescriptorProto
instance from aMessage
object.The text was updated successfully, but these errors were encountered: