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 摘要。