-
Notifications
You must be signed in to change notification settings - Fork 124
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
Dynamic types based on proto definition #581
Comments
Unlike protobuf.js, protobuf-ts depends on protoc for generating code. There is no way to directly convert the string content of a proto file into usable classes for encoding/decoding messages. You could potentially invoke protoc via a subprocess, but you'd still have to do everything via the file system (source files -> protoc -> out files -> Additionally, protobuf-ts doesn't generate a single "root" (top-level proto package namespace) with messages indexed based on their package + message name. Instead it generates a number of files which match the file structure of the input proto files where each file exports message classes which match their proto message name (unless there is a naming conflict like having your proto file contain a message named |
Hello,
First off, thank you for contributing this work to the open-source community using protobuf on the unofficially supported NodeJS / Typescript language.
I'm integrating this library with a schema registry that contains proto definitions. Is there an example of how to create a model class to use for serialization or deserialization on the fly?
Here's the code I've got working with protobufjs doing deserialization, but I don't like how this library handles bigints, etc.
Note: this is running with Deno. Your library works fine with Deno besides the extensions issue in the imports (which is easily fixed with the search/replace script).
TYIA for your help, appreciate it!
The text was updated successfully, but these errors were encountered: