把一段 JSON 粘贴进来,自动生成 TypeScript 的 interface 定义:嵌套对象拆成独立命名类型、数组会合并元素类型、null 会保留为联合类型。调接口、写类型定义时省去手敲。Paste a JSON sample to generate TypeScript interface definitions: nested objects become their own named types, array element types are merged, and nulls are kept as union members. Saves hand-typing types for APIs.
生成规则:同名嵌套对象只生成一次定义;数组里出现多种类型时会生成联合类型(如 (string | number)[]);空数组记为 unknown[]。生成的是「样例的结构」,如果某些字段在别的样例里可缺失,记得手动改成可选(字段后加 ?)。Rules: same-named nested objects are emitted once; mixed arrays become union types like (string | number)[]; empty arrays are unknown[]. The output describes your sample's shape — if a field is optional in other samples, mark it with ? yourself.