Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>JSON to CodeNew to Visual Studio Code? Get it now.
JSON to Code

JSON to Code

SaleemTheKing

|
424 installs
| (2) | Free
Converts JSON into Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

JSON to Code

This extension makes it easier to create classes, structs and interfaces from JSON code.

showcase

How to use

The extension automatically detects what file type is currently open in VS Code.

  1. Open a file (empty file preferred)
  2. Run the command Paste JSON as Code from the command palette
  3. Enter the Root object name (default: JsonObject) and press Enter

Supported Languages

  • C++
  • C#
  • Go
  • Java
  • JavaScript
  • Kotlin
  • PHP
  • Python
  • Rust
  • Scala
  • TypeScript

Extension Settings

  • jsonToCode.general.rootObjectName: The default name of the Root Object. (Default value: JsonObject)
  • jsonToCode.csharp.ListToArray: Use the Array type instead of List. (Default value: false)
  • jsonToCode.typescript.classes: Use Typescript classes instead of interfaces. (Default value: false)
  • jsonToCode.python.dataclass: Use Python dataclasses module. (Default value: true)
  • jsonToCode.Java.ListToArray: Use the Array type instead of List. (Default value: false)
  • jsonToCode.kotlin.ListToArray: Use the Array type instead of List. (Default value: false)
  • jsonToCode.scala.ListToArray: Use the Array type instead of List. (Default value: false)

Release Notes

1.1.0

  • Fix Java wrong keyword for import
  • Fix Object in Arrays not being converted to a new class
  • Fix duplicate class generation

1.0.1

  • Add logo to extension!

1.0.0

Initial release of JSON to Code!

Author

SaleemTheKing

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