DEV Community

Lucis
Lucis

Posted on

2

How to generate Typescript or C# types from JSON

Quick tip today: Frequently I build Node apps for working with pre-defined data (JSON, API's responses) and, after a loving/hating relation with Typescript and deciding that Typescript is good, I enjoy defining my types early on development, since it saves me a lot of time.

For helping me with this, I've found this awesome app that I can just drop a JSON sample and it will generate the types for me, supporting a dozen of languages: Quicktype.

It also has a VSCode Extension that allows you to do this without leaving your editor.

It supports TypeScript, Python, Go, Ruby, C#, Java, Swift, Rust, Kotlin, C++, Flow, Objective-C, JavaScript, Elm, and JSON Schema.

Hope that it helps ;D

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay