@protos/to-json
TypeScript icon, indicating that this package has built-in type declarations

0.0.14 • Public • Published

@protos/to-json

Command-line tool to parse and output a JSON format from .proto files that can be used with other @protos modules or by anyone who likes dealing with JSON rather than protocol buffer descriptors.

This module will crate a binary named protos-to-json that can be used to parse protocol buffers and create a JSON description. If your protos use any third party protos, you can reference them by their github URL and a base directory within the repo.

Example Usage

# Export all .proto files in /protos to STDOUT
protos-to-json \
  # Include protos from the grpc/grpc github repo starting at the base directory src/proto/grpc
  -i https://github.com/grpc/grpc.git:src/proto/grpc \
  # Include protos from the protocolbuffers/protobuf github repo starting at the base directory src/google
  -i https://github.com/protocolbuffers/protobuf.git:src/google \
  /protos

Related Modules

Readme

Keywords

none

Package Sidebar

Install

npm i @protos/to-json

Weekly Downloads

0

Version

0.0.14

License

MIT

Unpacked Size

10.4 kB

Total Files

8

Last publish

Collaborators

  • mattinsler