Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>C# class to JSONNew to Visual Studio Code? Get it now.
C# class to JSON

C# class to JSON

Akshay Raut

|
1,454 installs
| (0) | Free
Creates sample JSON from C# class
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

csharpclasstojson README

Get Started 🚀

To get started, hit the 'clear' button at the top of the editor!

Features

You can generate sample JSON output from a document tab that contains a C# class. It creates the JSON by scanning all properties and their data types.

How to use

  1. Keep a C# class structure in a document tab in VS code.
  2. Press Ctrl+Shift+P to open Command Palette.
  3. Search by typing "Create JSON from a C# class".
  4. Press Enter key and it will produce sample JSON in a new document tab.

1.1.1

  1. Support for generics: Lists and Dictionary

1.0.1

  1. Minor bug fixes

1.0.0

  1. Support for multiple disassociated classes
  2. Support for multiple associated classes that are nested inside one another.
  3. Support for including fields
  4. Support for ingoring backing fields of properties by selecting "... ignore backing fields" command.

0.4.0

It supports one class as input currently, however in the next version we will include support for multi class features. The values of all properties will be default based on the data type.

Following extension guidelines

The required minimum version of VS code is 1.77.0

For more information

  • Source code:
  • Visual Studio Code's Markdown Support
  • Markdown Syntax Reference

Enjoy!

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