grpc - 将文件从 file_pb.js 编译为 file.proto
问题描述
我知道如何从编译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.
推荐阅读
- clojure - 如何解决药物持有率(MPR)问题?
- java - 我使用 StormConfigs startOffsetTime 作为 LatestTime 但如果风暴停止,那么它正在丢失生产者产生的数据
- apache - 在多个 URL 上使用相同的 tomcat 实例
- wordpress - 更新 mailchimp 电子邮件订阅不起作用
- sql - 在 influxDB 中执行了错误的 SQL 查询
- scala - 使用 Scala 在 Spark 中进行空值插补
- python-3.x - keyDown 功能不适用于 shift 键
- android - 带有旋转图像的 Android Recycler 视图
- docker - 如何修复 Rancher 中的“集群必须至少有一个 etcd 平面主机:无法连接到以下 etcd 主机 [10.xxx.xxx.36]”?
- javascript - localhost webapp 上的本地开发和 Cors 策略阻止的 localhost 访问