Skip to content
| Marketplace
Sign in
Visual Studio>Tools>JsonToCsFileGenerator
JsonToCsFileGenerator

JsonToCsFileGenerator

Attila Gál

|
1,708 installs
| (2) | Free
This tool helps you transform one dimentional json "dictionary" into a static c# class with attributes.
Download

This tool helps you transform a non-nested JSON file into a static c# class with the same static fields as the source file.

Usage:

  1. Install the tool
  2. Create a json file 
  3. Right click on the newly created file and select "Properties"
  4. In the "Custom Tool" field set "JsonToCsFileGenerator"
  5. Save the file and observe as the ".cs" file is generated

Sample:

From

"test.json"

with contents:

{  "a": "b",  "c": "d" }

into "test.cs"

 public static class test  

{

 public static string a => "b";

 public static string c => "d"; 

} 

Note: namespace will be generated based on the file's location regarding to the solution, classname will be the same as the file's name

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