John_123
John_123

Reputation: 67

compile file from file_pb.js to file.proto

I know how could I compile from file.proto to file_pb.js using this command:

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

But, how I can convert from file_pb.js to file.proto

Upvotes: 0

Views: 242

Answers (1)

murgatroid99
murgatroid99

Reputation: 20297

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.

Upvotes: 1

Related Questions