Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>JSON Type GeneratorNew to Visual Studio Code? Get it now.
JSON Type Generator

JSON Type Generator

kasraghoreyshi

|
1,361 installs
| (0) | Free
Generates Typescript types for any REST API endpoint or any URL that returns a JSON.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

This extensions generates Typescript types based on any URL that has JSON as it's response.

Usage

Hover over any link in a typescript (.ts or .tsx) file and when the popup appears on your cursor, click on the button "POST" to send a POST request to the hovered URL or click on the button "GET" to send a GET request to the hovered URL. The extension will then find the nearest empty line upwards and write in the generated type.

Screenshot of JSON Type Generator

Configuration

"json-type-generator.arrayDeclarationAsBrackets": false

By enabling this setting, arrays will be generated as T[] instead of Array<T>.

"json-type-generator.askForHeadersInGetRequest": false

By enabling this setting, JSON Type Generator will ask you to enter headers before generating types using the GET method.

"json-type-generator.askForHeadersInPostRequest": true

By enabling this setting, JSON Type Generator will ask you to enter headers before generating types using the POST method.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft