Skip to content
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

Parsing protos in runtime #317

Closed
lotus-x opened this issue May 20, 2022 · 1 comment
Closed

Parsing protos in runtime #317

lotus-x opened this issue May 20, 2022 · 1 comment

Comments

@lotus-x
Copy link

lotus-x commented May 20, 2022

Hi,

I want to serdes proto messages in runtime with kafka schema registry.

Does the library support for parsing a proto string in runtime, get reflection details and encode/decode messages on the fly?

@timostamm
Copy link
Owner

Hey, this library does not implement a parser for proto - so this is not possible from proto files. Proto parsing is unfortunately not trivial, there are many edge cases that are only specified by the implementation protoc.

If you have file descriptors (protoc can output them) you can create protobuf-ts types at runtime. This requires quite a bit of translation from descriptors to our own simplified metadata. interpreter.ts does exactly that. It is not a happy path though, this isn't part of the public API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants