从protobuf规范生成JSON对象的d.ts文件
项目描述
# json-ts-protobuf:从protobuf规范生成JSON对象的TypeScript声明文件
## 要求 protoc 3.0.0或更高版本 python 3.5 其他配置可能也适用。
## Python实现 目前仅有一个Python实现的插件
可以使用以下命令安装插件:
pip install json-ts-protobuf
在posix上,确保protoc-gen-json-ts脚本已安装到您的$PATH。然后运行。
protoc –json-ts_out=output/location
或者,您可以显式提供路径
protoc –plugin=protoc-gen-json-ts=path/to/protoc-gen-json-ts –json-ts_out=output/location
要抑制输出,您可以运行
protoc –json-ts_out=quiet:output/location