ToolHub
中文
Light
GitHub
返回首页
/
数据格式
/
JSON 转 Go Struct
加载中...
结构体名
JSON 标签
示例
JSON
{ "id": 1, "name": "John Doe", "email": "john@example.com", "age": 30, "is_active": true, "score": 95.5, "tags": ["developer", "golang"], "address": { "street": "123 Main St", "city": "New York", "zip_code": "10001" } }
Go Struct
type AutoGenerated struct { Id int `json:"id"` Name string `json:"name"` Email string `json:"email"` Age int `json:"age"` IsActive bool `json:"is_active"` Score float64 `json:"score"` Tags []string `json:"tags"` Address struct { Street string `json:"street"` City string `json:"city"` ZipCode string `json:"zip_code"` } `json:"address"` }