command
Version:
v1.1.23
Opens a new window with list of versions in this module.
Published: Dec 11, 2024
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
protoc-gen-json-field
Generate json code based on proto files.
Installation
Installation of dependency plugins
# install protoc in linux
mkdir -p protocDir \
&& curl -L -o protocDir/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v3.20.1/protoc-3.20.1-linux-x86_64.zip \
&& unzip protocDir/protoc.zip -d protocDir\
&& mv protocDir/bin/protoc protocDir/include/ $GOROOT/bin/ \
&& rm -rf protocDir
Install protoc-gen-json-field
go install github.com/18721889353/sunshine/cmd/protoc-gen-json-field@latest
Usage
# generate json file
protoc --proto_path=. --json-field_out=. --json-field_opt=paths=source_relative demo.proto
Documentation
¶
Package main is a library that parses protobuf files into json
Source Files
¶
Directories
¶
Package generate is generate json field code.
|
Package generate is generate json field code. |
Package parser is parsed proto file to struct
|
Package parser is parsed proto file to struct |
Click to show internal directories.
Click to hide internal directories.