Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 651 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 651 Bytes

protoc-gen-jsonify

Adds encoding/json Marshaler and Unmarshaler methods on PB messages that utilizes the more correct jsonpb package. See: https://godoc.org/github.com/golang/protobuf/jsonpb

From: https://github.com/lyft/protoc-gen-star/tree/master/testdata/protoc-gen-example

Installation

go get github.com/hr3lxphr6j/protoc-gen-jsonify

Parameters

  • jsonpb: specify the jsonpb lib which you what to use, default is github.com/golang/protobuf/jsonpb

Examples

protoc \
    -I . \
    --go_out=":../generated" \
    --jsonify_out="jsonpb=github.com/gogo/protobuf/jsonpb:../generated" \
    example.proto