C# Generator

Generate C# classes and records from JSON data structures

JSON Input

Loading...

Generated C#

Enter JSON data to generate C# classes and records

Classes, records, and properties with nullable types

Frequently Asked Questions

What C# features are supported?

The generator creates C# classes with properties, supports JSON.NET and System.Text.Json attributes, records (C# 9+), and follows .NET naming conventions with proper namespaces.

Can I generate C# records instead of classes?

Yes! Select 'Record' as the framework to generate modern C# records with immutable properties, perfect for data transfer objects and value types.

How does JSON serialization work?

The generator supports both Newtonsoft.Json and System.Text.Json attributes for proper JSON serialization/deserialization with custom property names and null handling.

What about nullable reference types?

The generator includes nullable annotations (object?) for properties that can be null, following modern C# nullable reference types conventions.