JSON ke struct Go
JSON ke struct Go
Berjalan dalam pelayar anda · Tiada muat naik
Alat ini dan arahan di halaman ini dalam bahasa Inggeris buat masa ini. Ia berfungsi dengan cara yang sama: semuanya berjalan dalam pelayar anda.
Generate Go
Pelayar anda terlalu lama untuk menjalankan alat ini. Sila kemas kininya, atau gunakan versi semasa Chrome, Edge, Firefox atau Safari.
- Tiada apa-apa meninggalkan peranti anda
- Tiada had saiz daripada pelayan
- Tiada pendaftaran, tiada tera air
- Percuma
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.
Soalan lazim
Is my JSON uploaded?
No. Everything happens in your browser, and the page is blocked from uploading anything.