Skip to content

peterklijn/proton

 
 

Repository files navigation

proton

cli protobuf to json converter.

Installation

Execute:

$ go get github.com/beatlabs/proton

Or download from Releases

Or using Homebrew 🍺

brew tap beatlabs/proton https://github.com/beatlabs/proton
brew install proton

Usage

Usage:
  proton json [flags]

Flags:
  -f, --file string      Proto file path or url
  -h, --help             help for json
      --indent           Indent output json
  -p, --package string   Proto package
                         Defaults to the package found in the Proton file if not specified
  -t, --type string      Proto message type
                         Defaults to the first message type in the Proton file if not specified

Examples

Proto file from URL with input message as argument

proton json -f https://raw.githubusercontent.com/protocolbuffers/protobuf/master/examples/addressbook.proto testdata/out.bin

Proto file from local with input message as argument

proton json -f ./testdata/addressbook.proto testdata/out.bin

Proto file from URL with input message piped

cat testdata/out.bin | proton json -f https://raw.githubusercontent.com/protocolbuffers/protobuf/master/examples/addressbook.proto

Proto file from local with input message piped

cat testdata/out.bin | proton json -f ./testdata/addressbook.proto

About

cli protobuf to json converter

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 93.8%
  • Ruby 4.1%
  • Makefile 2.1%