JSON 转代码
根据示例 JSON 生成 TypeScript、Swift、Python、Go、Rust、Kotlin 或 Zod 类型,可设置根类型名称。
使用方法
- 粘贴输入内容或加载下方示例。
- 调整选项后点击“生成类型”。
- 检查结果,然后复制或下载。
无需上传,无需账户,处理完全在浏览器内完成。
输入示例
{"orderId":"ORD-2048","customer":{"name":"Ada Lovelace","email":"[email protected]","address":{"city":"London","country":"GB"}},"items":[{"sku":"KB-01","name":"Mechanical keyboard","quantity":1,"price":89.5},{"sku":"CB-02","name":"USB-C cable","quantity":2,"price":12.75}],"paid":true,"discount":null,"tags":["priority","gift"]}