0

我知道如何从编译file.protofile_pb.js使用此命令:

c:\protobuf\bin\protoc.exe --js_out=import_style=commonjs,binary:. .\file.proto

但是,我如何转换file_pb.jsfile.proto

4

1 回答 1

1

You are unlikely to find a tool that does what you are asking for. The process of compiling a .proto file to a programming language was not intended to be reversible. The intention is for the .proto file to be the "source of truth" that directly describes APIs and the structure of the messages.

于 2020-08-10T21:55:43.407 回答