JSON เป็น TypeScript
JSON เป็น TypeScript
ทำงานในเบราว์เซอร์ · ไม่ต้องอัปโหลด
ขณะนี้เครื่องมือและคำแนะนำในหน้านี้ยังเป็นภาษาอังกฤษ แต่ทำงานเหมือนกันทุกประการ: ทุกอย่างทำงานในเบราว์เซอร์ของคุณ
Generate TypeScript
เบราว์เซอร์ของคุณเก่าเกินไปที่จะใช้เครื่องมือนี้ โปรดอัปเดต หรือใช้ Chrome, Edge, Firefox หรือ Safari เวอร์ชันปัจจุบัน
- ไม่มีสิ่งใดออกจากอุปกรณ์ของคุณ
- เซิร์ฟเวอร์ไม่จำกัดขนาดไฟล์
- ไม่ต้องสมัคร ไม่มีลายน้ำ
- ฟรี
How to convert JSON to TypeScript
- Paste your JSON, or try the example.
- Choose interface or type, export and optional fields.
- Copy or download the TypeScript.
What you get
- An interface for every object, named after its key.
- Optional fields (name?: string) for fields missing from some array items.
- Union types (string | null) where values differ.
- Keys that aren't valid names (like "created-at") are quoted.
คำถามที่พบบ่อย
Is my JSON uploaded?
No. Everything happens in your browser, and the page is blocked from uploading anything.