- Executors
-
Learn
Python Learning Hub Runnable examples, NumPy, pandas, and more C & C++ Learning Hub Pointers, memory, STL, and modern C++ C# Learning HubC# basics, OOP, LINQ, async, and .NET exercises Python Algorithms Search, sorting, recursion, and visualizers O(n) C & C++ Algorithms Compare algorithms implemented in C and C++
- Challenges
Converters
JSON to C# Class Generator
Turn a JSON sample into C# model classes ready for System.Text.Json or Newtonsoft.Json.
- Runs in your browser
- Instant results
- Free, no sign-up
Loading the tool…
How to use the JSON to C# Class
- Paste a JSON sample.
- Choose class or record, the attribute style, collections and namespace.
- Copy the code or download Models.cs.
Frequently asked questions
Which JSON library attributes are supported?
System.Text.Json ([JsonPropertyName]) and Newtonsoft.Json ([JsonProperty]), or none.
How are numbers typed?
Whole numbers become long and decimals become double. Dates in ISO format become DateTime.
What are nullable reference types?
With the option on, values that can be null get a ? such as string?, matching C# 8+ nullable context.
Practice Python with coding challenges
Solve hands-on problems right in this editor: run the sample tests, submit, and get an AI code review.