项目作者: dravinbox

项目描述 :
Convert JSON to Go Struct,把json转换为Go的结构体
高级语言: Go
项目地址: git://github.com/dravinbox/json2GoStruct.git
创建时间: 2019-01-21T06:07:48Z
项目社区:https://github.com/dravinbox/json2GoStruct

开源协议:MIT License

下载


json2GoStruct

Convert JSON to Go Struct,把json转换为Go的结构体

安装

  1. go get -v github.com/dravinbox/json2GoStruct

快速使用

Web模式

  1. $ json2GoStruct -w

命令行模式

  1. $ cat << EOF >./file.json
  2. {"name": "zry", "Age": 18,"car": { "car_name": "benzi","color": "red" }}
  3. EOF
  4. $ json2GoStruct

指定的json文件路径,指定Struct名称

  1. $ json2GoStruct -f <filePath> -n Dravin