Loading...
Turn a JSON sample into TypeScript interfaces or Go structs (with json tags) — nested objects become named types. Great for typing API responses.
Nested objects become named types. Arrays are typed from their first element.
export interface Address {
city: string;
zip: string;
}
export interface Root {
id: number;
name: string;
active: boolean;
score: number;
roles: string[];
address: Address;
tags?: any;
}