Skip to content

masakurapa/go-json2struct

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-json2struct

a web tool for converting JSON strings into Go struct

The web application is available at here !!

Example for use as a module

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)
}