我知道如何从编译file.proto
到file_pb.js
使用此命令:
c:\protobuf\bin\protoc.exe --js_out=import_style=commonjs,binary:. .\file.proto
但是,我如何转换file_pb.js
为file.proto
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.