Generate C# classes with JsonPropertyName attributes from a nested application configuration object. Paste your config JSON and get typed C# class files.
// Generated by DevBento — json-to-typescript
interface RootApp {
name: string;
version: string;
debug: boolean;
}
interface RootDatabaseCredentials {
user: string;
password: string;
}
interface RootDatabase {
host: string;
port: number;
credentials: RootDatabaseCredentials;
}
interface RootFeatures {
darkMode: boolean;
maxConnections: number;
allowedOrigins: string[];
}
interface Root {
app: RootApp;
database: RootDatabase;
features: RootFeatures;
}Application configs have deep nesting: app settings, database credentials, feature flags. This example generates C# classes from a multi-level config structure so you can deserialize configuration files directly in your .NET application.
The tool produces:
Root class with three top-level sections: App, Database, FeaturesRootApp class with Name, Version, Debug propertiesRootDatabase class with Host, Port, and Credentials nested classRootDatabaseCredentials class for database authRootFeatures class with DarkMode, MaxConnections, and AllowedOrigins liststring, long, double, bool, List<string>.NET config libraries like Microsoft.Extensions.Configuration work well with typed classes. Generate classes from your default config, then use JsonSerializer.Deserialize or your config library’s binder to populate them from JSON files, environment variables, or command-line flags.
Nothing you paste leaves this tab. Every tool runs entirely in your browser — no upload, no server, no account.