A worked example, rendered from real sample data. Sign in to run the tool on your own input.
{"id":1,"name":"Alice","email":"alice@example.com","active":true,"tags":["admin"],"created_at":"2024-01-15T10:30:00Z"}package main
type Root struct {
Id int `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
Active bool `json:"active"`
Tags []string `json:"tags"`
CreatedAt string `json:"created_at"`
}
Convert JSON to Go struct definitions with json tags. Part of the DevTools Surf developer suite. Browse more tools in the Converters collection.