JSON para Struct Go
Gere definições de struct Go a partir de dados JSON. Lida com objetos aninhados, arrays e tags json adequadas.
Features:
- • Converts JSON to Go struct definitions
- • Handles nested objects and arrays
- • Generates proper json tags
- • Converts snake_case to PascalCase
- • Optional omitempty and pointer types
Go Structs - Detalhes Técnicos
Go structs with json tags enable seamless JSON marshaling and unmarshaling. Field names are converted to PascalCase while json tags preserve the original JSON keys.
Alternativa via Linha de Comando
# Using json-to-go CLI
go install github.com/mholt/json-to-go/cmd/json-to-go@latest
echo '{"name":"test"}' | json-to-go