Can I generate nested models from JSON?
Yes. The generator supports nested objects and arrays and outputs corresponding nested model definitions.
Generate TypeScript type aliases from JSON examples when alias-based typing fits better than interface declarations.
{
"id": 101,
"name": "Ada Lovelace",
"active": true,
"roles": ["admin", "editor"],
"profile": {
"email": "ada@example.com",
"score": 9.8
}
}
export type UserModel = {
id: number;
name: string;
active: boolean;
roles: string[];
profile: Profile;
};
Yes. The generator supports nested objects and arrays and outputs corresponding nested model definitions.
Yes. Use the Force Optional toggle in the app toolbar when you need optional fields in the generated output.
Choose type aliases when your codebase prefers alias-based composition, unions, or other patterns that do not need interface-specific features.