JSON เป็น struct ของ Go
JSON เป็น struct ของ Go
ทำงานในเบราว์เซอร์ · ไม่ต้องอัปโหลด
ขณะนี้เครื่องมือและคำแนะนำในหน้านี้ยังเป็นภาษาอังกฤษ แต่ทำงานเหมือนกันทุกประการ: ทุกอย่างทำงานในเบราว์เซอร์ของคุณ
Generate Go
เบราว์เซอร์ของคุณเก่าเกินไปที่จะใช้เครื่องมือนี้ โปรดอัปเดต หรือใช้ Chrome, Edge, Firefox หรือ Safari เวอร์ชันปัจจุบัน
- ไม่มีสิ่งใดออกจากอุปกรณ์ของคุณ
- เซิร์ฟเวอร์ไม่จำกัดขนาดไฟล์
- ไม่ต้องสมัคร ไม่มีลายน้ำ
- ฟรี
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.
คำถามที่พบบ่อย
Is my JSON uploaded?
No. Everything happens in your browser, and the page is blocked from uploading anything.