JSON verilerinden iç içe nesneler ve diziler desteğiyle TypeScript arayüzleri oluşturun.
JSON TS nasıl kullanılır
JSON'ınızı sol tarafa yapıştırın.
İsteğe bağlı olarak kök arayüz adını değiştirin.
Oluşturulan TypeScript arayüzlerini kopyalayın.
This is a JSON to TypeScript generator that infers a set of interfaces from an example JSON object or array, so you can paste an API response and get ready-to-use types instead of writing them by hand.
It is a big time-saver when you are consuming an API or a config file: paste a response, optionally name the root interface, and copy clean TypeScript straight into your code.
Generation runs entirely in your browser, so your data never leaves your device, which matters when the sample contains real values.
It handles real-world shapes: nested objects become their own named interfaces referenced from the parent, arrays of objects are merged into one interface, and union types are produced where values vary.
When the objects in an array do not all have the same keys, the keys missing from some elements are marked optional with a question mark, which matches how the data actually behaves and keeps the types honest.
One important point: it infers a shape from the single sample you give it, rather than enforcing a schema. If a field is sometimes null or absent in real data but not in your sample, the generated type will not know that, so use a representative example.
Sıkça sorulan sorular
Dizi elemanları ortak türü bulmak için analiz edilir. Dizi nesneler içeriyorsa, şekilleri için bir arayüz oluşturulur.
Evet. Her iç içe nesne kendi arayüzünü oluşturur ve üst arayüzde ona başvurulur.
Hayır. Dönüştürme tamamen tarayıcınızda çalışır, bu nedenle verileriniz asla cihazınızdan ayrılmaz.
Bu aracı göm
Bu aracı kendi web sitenize ekleyin. Aşağıdaki kod parçacığını kopyalayın; otomatik olarak güncel kalır.
<iframe src="https://monu.tools/embed/tr/json-to-typescript" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>İlgili araçlar
Geçersiz girişler için net hata mesajlarıyla JSON'u çevrimiçi biçimlendirin, güzelleştirin ve doğrulayın.
JSON'u tarayıcınızda küçültün ve doğrulayın ve kaç bayt kazandığınızı görün.
JSON'u CSV'ye ve CSV'yi tekrar JSON'a dönüştürün, her iki yönde. Ayırıcıyı seçin, tırnaklı alanları işleyin ve sonucu kopyalayın. Her şey tarayıcınızda çalışır.
YAML'ı JSON'a ve JSON'u tekrar YAML'a dönüştürün, her iki yönde. Dönüştürürken doğrular ve net hatalar gösterir. Her şey tarayıcınızda çalışır.