Generate Kotlin data classes with kotlinx.serialization annotations from a nested application configuration object. Paste JSON, get typed Kotlin classes.
// 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 Kotlin data classes from a multi-level config structure so you can deserialize configuration files directly in your Kotlin application.
The tool produces:
Root data class with three top-level sections: App, Database, FeaturesRootApp data class with Name, Version, Debug propertiesRootDatabase data class with Host, Port, and Credentials nested classRootDatabaseCredentials data class for database authRootFeatures data class with DarkMode, MaxConnections, and AllowedOrigins listString, Long, Double, Boolean, List<String>Kotlin config loading with kotlinx.serialization works seamlessly with Json.decodeFromString. Generate data classes from your default config, then decode them from JSON files in your resources or from environment variables.
Nothing you paste leaves this tab. Every tool runs entirely in your browser — no upload, no server, no account.