Instantly generate C# models and helper methods from JSON.

Generate C# classes with Json.NET attributes
from JSON, JSON Schema, and GraphQL queries.

Generate C# NowInstall Visual Studio Extension

quicktype is fluent in

Install quicktype with brew
$ brew install quicktype$ brew install quicktype
Generate C# for a simple JSON sample$ echo '[1, 2, 3.14]' | quicktype --lang cs
$ echo '[1, 2, 3.14]' \    | quicktype --lang cs
Generate C# for a sample JSON file
$ quicktype person.json -o Person.cs$ quicktype person.json -o Person.cs
Generate C# from a directory of samples
$ ls spotify-api-samples$ ls spotify-api-samples
album.json artist.json track.json$ quicktype spotify-api-samples -o QTSpotifyClient.cs
$ quicktype -o SpotifyClient.cs \    spotify-api-samples
Generate C# models for a weather API$ quicktype https://goo.gl/Dq2yKd -o Weather.cs
$ quicktype -o Weather.cs \    https://goo.gl/Dq2yKd
Generate C# classes from TypeScript types
$ quicktype types.ts -o Types.cs$ quicktype types.ts -o Types.cs
Generate C# from a Postman Collection$ quicktype ImgurAPI_postman_collection.json -l postman -o Imgur.cs
$ quicktype -o Imgur.cs \    -l postman \    ImgurAPI_postman_collection.json

A better way to work with APIs.

The old way

Find a client library
A good one is golden, however most are outdated or simply unavailable in your app’s programming language.
Write your own client library
Takes a lot of effort and must be updated when the API changes. You should be focused on your app, anyway.
Read API data as dynamic, untyped values
This is an unpleasant way to program and leaves your app vulnerable to API changes.

With quicktype

Generate your client libraries
Given sample API responses, quicktype will generate an easy-to-use client library in your app’s language.
Spend more time on your app
quicktype can regenerate types when APIs change, so you can simply update affected app code, if any.
Access strongly typed API data with help
Get more out of your editor or IDE (autocomplete, refactoring) when working with typed API data.
;