合併 PDF
QR Code 產生器
密碼產生器
JSON 格式化工具
所有工具
返回首頁
從 JSON 產生 TypeScript 介面
根名稱
JSON
{ "id": 1, "name": "Ana", "active": true, "address": { "city": "São Paulo", "zip": "01000-000" }, "tags": ["a", "b"] }
TypeScript 介面
複製
interface Root { id: number; name: string; active: boolean; address: Address; tags: string[]; } interface Address { city: string; zip: string; }
貼上 JSON 物件,取得包含巢狀物件與陣列的 TypeScript 介面,可直接用於程式碼中。