Nested StructsJSON Tags100% Private
type Root struct {
	Id int `json:"id"`
	Name string `json:"name"`
	Email string `json:"email"`
	Active bool `json:"active"`
	Score float64 `json:"score"`
	Address Address `json:"address"`
	Tags []string `json:"tags"`
	Orders []OrdersItem `json:"orders"`
}

type OrdersItem struct {
	Id int `json:"id"`
	Total float64 `json:"total"`
}

type Address struct {
	Street string `json:"street"`
	City string `json:"city"`
	Zip string `json:"zip"`
}

FAQ

Does it handle nested objects?
Yes. Nested objects generate separate named structs with proper Go naming.
Are JSON tags included?
Yes. Each field includes a json:"..." struct tag matching the original JSON key.
What Go types are generated?
string, int, float64, bool, []type for arrays, and nested struct types for objects.
Share:

Love this tool? Explore 999+ more

Free online tools for images, PDFs, text, code, and more. All running in your browser.

Explore All Tools