a web tool for converting JSON strings into Go struct
The web application is available at here !!
Check pkg.go.dev for examples.
$ go get -u github.com/masakurapa/go-json2struct
package main
import (
"fmt"
"github.com/masakurapa/go-json2struct/pkg/j2s"
)
func main() {
input := `{"title": "j2s"}`
output, err := j2s.Convert(input)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(output)
}