☰
Home
/
Code Generators
/
JSON → Go
Go
JSON → Go
Generate Go struct with json tags from JSON
☆
Bookmark
Loading tool…
JSON input
{ "id": 1, "name": "Ada Lovelace", "email": "ada@example.com", "isActive": true, "score": 98.6, "tags": ["admin", "developer"], "address": { "street": "123 Main St", "city": "London" }, "orders": [{ "id": 101, "total": 49.99, "shipped": false }] }
Go output
⧉ Copy
type Address struct { Street string `json:"street"` City string `json:"city"` } type Order struct { Id int64 `json:"id"` Total float64 `json:"total"` Shipped bool `json:"shipped"` } type Root struct { Id int64 `json:"id"` Name string `json:"name"` Email string `json:"email"` IsActive bool `json:"isActive"` Score float64 `json:"score"` Tags []string `json:"tags"` Address Address `json:"address"` Orders []Order `json:"orders"` }