/j2gs

Convert json strings to Go struct

Primary LanguageGo

j2gs

Convert a json file to Go struct.

go get -u github.com/junpayment/j2gs
j2gs sample.json

sample.json

{"hoge_hoge": 1, "fuga": "chome"}

You will get go struct below.

type Hoge struct {
  Fuga string `json:"fuga:string"`
  HogeHoge int `json:"hoge_hoge:int"`
}