module
Version:
v0.0.0-...-c85aca1
Opens a new window with list of versions in this module.
Published: Jan 5, 2023
License: BSD-3-Clause
Opens a new window with license information.
README
¶
proto-lens-jsonpb
Quick hack to generate orphan ToJSON/FromJSON instances for proto-lens.
This requires the use of proto-lens to generate haskell datatypes from proto messages.
Requirements
- Install
protoc (e.g., brew install protoc)
- Install the required protoc plugins:
cabal install proto-lens-protoc
go install github.com/tclem/proto-lens-jsonpb/protoc-gen-jsonpb_haskell
Usage
Use the protoc plugin to generate associated protobuf types from a proto file.
protoc -I=. --proto_path=./proto \
--plugin=protoc-gen-haskell=`which proto-lens-protoc` --haskell_out=./app \
--plugin=protoc-gen-jsonpb_haskell=./script/run-jsonpb_haskell --jsonpb_haskell_out=./app \
haberdasher.proto
Directories
¶
Click to show internal directories.
Click to hide internal directories.