Little Big Details are the subtle details that quicktype takes care of when turning your data into beautiful, readable code.
The Problem
JSON property names come in all shapes and sizes:
{
"user_name": "alice",
"firstName": "Alice",
"LAST-NAME": "Smith",
"EmailAddress": "alice@example.com"
}
Different languages have different naming conventions:
- Swift uses
camelCasefor properties - Python uses
snake_case - C# uses
PascalCase
The Solution
quicktype intelligently converts property names to match each language's conventions while preserving the ability to serialize/deserialize correctly.
For Swift, the above JSON becomes:
struct User: Codable {
let userName: String
let firstName: String
let lastName: String
let emailAddress: String
enum CodingKeys: String, CodingKey {
case userName = "user_name"
case firstName
case lastName = "LAST-NAME"
case emailAddress = "EmailAddress"
}
}
How It Works
quicktype:
- Detects the naming style of each property (snake_case, camelCase, kebab-case, etc.)
- Splits the name into words
- Reconstructs the name in the target language's convention
- Generates mapping code when the JSON name differs from the property name
This ensures your code feels native while maintaining perfect JSON compatibility.