• Stars
    star
    228
  • Rank 175,267 (Top 4 %)
  • Language
    TypeScript
  • License
    Apache License 2.0
  • Created almost 7 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

VS Code extension to convert JSON to TypeScript, C#, Go, and many more

Marketplace Installs Ratings

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

  • Interactively generate types and (de-)serialization code from JSON, JSON Schema, and TypeScript
  • Paste JSON/JSON Schema/TypeScript as code

quicktype infers types from sample JSON data, then outputs strongly typed models and serializers for working with that data in your desired programming language. For more explanation, read A first look at quicktype.

In any JSON file, use the command "Open quicktype for JSON" to summon quicktype, which will generate types from the JSON. Invoke "Change quicktype's target language" to pick a different language. There are similar "Open quicktype" commands for JSON Schema and TypeScript.

Another way to use quicktype is to copy JSON into the clipboard and invoke "Paste JSON as code/types":

For a more powerful experience, including custom options and the ability to generate code from multiple JSON samples, try quicktype.io.

Installing

This extension is available for free in the Visual Studio Code Marketplace

Customization

  • quicktype.justTypes: Generate only types, or also produce (de)serialization code when using "Open quicktype". When using "Paste", you can pick between the commands for "types" and "code", without having to set this option.

  • quicktype.inferMaps, quicktype.inferEnums, quicktype.inferDateTimes, quicktype.inferUuids, quicktype.inferBoolStrings, quicktype.inferIntegerStrings: Tell quicktype whether it should try to infer those types from the input JSON. This is not a precise science, so sometimes the guess will be wrong, which is why you can turn them off through these options. Also, quicktype doesn't support dates, UUIDs and stringified integers/booleans in all target languages yet.

Contribute!

quicktype is an open source project, and we're always happy about contributors. If you can think of a way to improve this extension, or quicktype, please consider contributing, especially if you know TypeScript. Code is only one way to contribute, though: we're particularly short on documentation. We'd also love to hear your feedback - come talk to us on Slack!

If you find a bug, please report it on GitHub.

More Repositories

1

quicktype

Generate types and converters from JSON, Schema, and GraphQL
TypeScript
11,384
star
2

glide-data-grid

๐Ÿš€ Glide Data Grid is a no compromise, outrageously react fast data grid with rich rendering, first class accessibility, and full TypeScript support.
TypeScript
3,841
star
3

quicktype-xcode

Xcode extension to paste JSON as Swift, Objective-C, and more
JavaScript
1,673
star
4

canvas-hypertxt

The fastest way to layout wrapped text on a HTML5 canvas
TypeScript
88
star
5

autotune

Automatically tunes apps and websites to improve outcomes
TypeScript
74
star
6

quicktype-vs

Visual Studio extension to paste JSON as C#, C++, TypeScript, and more
C#
50
star
7

figma-types

Typed client code for Figma Platform
Objective-C
47
star
8

glide-code-columns

Custom computed columns for Glide
TypeScript
20
star
9

ts-helper

Analyze TypeScript projects
JavaScript
12
star
10

graphql-samples

Sample code showing how to use quicktype for GraphQL
C#
11
star
11

ts-necessities

Small utilities to make life with TypeScript easier
TypeScript
11
star
12

glide-api

Create Glide API column endpoints.
TypeScript
8
star
13

collection-utils

Utility functions for Javascript collections
TypeScript
8
star
14

markov-react

Visualizing results from a simple Markov Chain
TypeScript
6
star
15

quicktype-custom-csharp-example

An example showing how to extend quicktype via its API
TypeScript
6
star
16

quicktype-custom-java-example

An example showing how to customize quicktype's Java code generation
TypeScript
4
star
17

comment-tags

Put tags in your comments, ร  la Roam
TypeScript
2
star
18

nextjs-docs-example

JavaScript
1
star
19

react-playground

For quickly prototyping React components with Typescript
TypeScript
1
star
20

make-fake

Generate fake data
JavaScript
1
star