Type generation
Turn any document into ready-to-paste type definitions for 9 languages.
Targets
Pandia generates types for nine targets:
| Target | Output |
|---|---|
| TypeScript | export interface |
| Rust | Derived struct |
| Go | struct with JSON tags |
| Kotlin | data class |
| Python | @dataclass |
| PHP | final readonly class |
| Java | POJO with getters and setters |
| Zod | z.object(...) schema |
| JSON Schema | Draft 2020-12 |
How it works
Open the Types panel in the sidebar, pick a target, and copy the output. Generation samples the document and infers the shape: where a field's values are missing in some objects, or are null, Pandia marks that field optional or nullable in the generated type.
Example
Given a small JSON object:
{
"id": 42,
"name": "Ada",
"email": null,
"active": true
} The TypeScript target produces:
export interface Root {
id: number;
name: string;
email: null;
active: boolean;
} Not configurable, by design
Note — the output is opinionated. There are no naming-convention settings or option toggles — each language uses fixed, idiomatic casing, and optionals are inferred for you rather than configured. Pick a target, copy, paste.
Next steps
Per-language guides: JSON to TypeScript, Rust, Go, Python and Zod — or browse all JSON converters.
Need the data itself out, not just its types? See Export.