FasterXML / FasterXML/jackson-dataformats-binary

[protobuf] create ProtoSchema from descriptor file

未关闭
#78 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
protobuf
主要语言
Java
星标
347
派生
156
平均合并
3 天 3 小时
30 天内合并 PR
22

描述

I would like to create ProtobufSchema objects from the descriptor files instead of proto files. `protoc -o output.desc` can generate the descriptor file `output.desc` by compiling multiple proto files. It's often easier to use the descriptor file than dealing with multiple .proto files. At my work we have fairly complex proto files.

I actually have an [experimental implementation](https://gist.github.com/knoguchi/211f44a2137b5def37fbdc04a6db437e). I used Google's official protobuf-java and [protobuf-dynamic](https://github.com/os72/protobuf-dynamic) to read the descriptor file.

Questions

1. would you consider adding the "ProtobufSchema by descriptor file" feature?
2. if the answer is yes, do you think the above approach is acceptable i.e. use google's official protobuf jars, and this._source being null.
3. If the answer is no, would you add a public constructor that takes a ProtobufMessage argument to the ProtobufSchema so that the 3rd party library can create ProtobufSchema objects without ProtoFile object.

thanks.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。