FasterXML / FasterXML/jackson-dataformats-binary

[protobuf] create ProtoSchema from descriptor file

Đang mở
#78 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
protobuf
Ngôn ngữ chính
Java
Star
347
Fork
156
Merge trung bình
3 ngày 3 giờ
Pull request đã merge (30 ngày)
22

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.