JSON en struct Go
JSON en struct Go
Fonctionne dans votre navigateur · Aucun envoi
L’outil et les instructions de cette page sont en anglais pour le moment. Il fonctionne de la même façon : tout se passe dans votre navigateur.
Generate Go
Votre navigateur est trop ancien pour cet outil. Mettez-le à jour, ou utilisez une version récente de Chrome, Edge, Firefox ou Safari.
- Rien ne quitte votre appareil
- Aucune limite de taille imposée par un serveur
- Sans inscription, sans filigrane
- Gratuit
How to convert JSON to Go
- Paste your JSON, or try the example.
- Choose omitempty and pointers for nullable fields.
- Copy or download the Go code.
What you get
- A struct for every object, with fields lined up as gofmt does.
- Go names with common initialisms (ID, URL, HTTP, JSON) and json tags with the original keys.
- int64 for whole numbers and float64 for decimals.
- omitempty for fields missing from some items, and *T for fields that can be null.
Questions fréquentes
Is my JSON uploaded?
No. Everything happens in your browser, and the page is blocked from uploading anything.