- Esecutori
-
Impara
Centro di apprendimento Python Esempi eseguibili, NumPy, pandas e altro Centro di apprendimento C e C++ Puntatori, memoria, STL e C++ moderno Centro di apprendimento C#Fondamenti, OOP, LINQ, async ed esercizi .NET Algoritmi Python Ricerca, ordinamento, ricorsione e visualizzazioni O(n) Algoritmi C e C++ Confronta le implementazioni in C e C++
- Sfide
Converters
JSON to TypeScript Converter
Paste a JSON sample and get TypeScript interfaces for every nested object.
- Runs in your browser
- Instant results
- Free, no sign-up
Loading the tool…
How to use the JSON to TypeScript
- Paste a JSON object or array.
- Choose the root type name, interface or type, and export or readonly.
- Copy the TypeScript or download a .ts file.
Frequently asked questions
How are optional fields detected?
When an array contains objects, keys missing from some items are marked optional with ?.
How are null values typed?
Fields that are null in some samples get a | null union.
Should I use interface or type?
Both work for object shapes. Interfaces can be extended and merged; types are more flexible for unions.
Esercitati in Python con le sfide di codice
Risolvi problemi pratici direttamente in questo editor: esegui i test di esempio, invia la soluzione e ricevi una revisione AI del codice.