Clean C# Models From Real Payloads
Writing DTOs by hand for a third-party API is slow, and it's easy to miss a field. Paste a real response and Scrubtly infers a complete model graph: one public class per nested object, List<T> for arrays, and property types chosen from the actual values rather than guessed.
- PascalCase properties with
[JsonPropertyName("…")]whenever the C# name differs from the JSON key, soSystem.Text.Jsondeserializes correctly without extra options. - Smart number types:
int,longfor IDs beyond 32 bits,doublefor decimals — anddecimalfor money fields likeprice,amount, ortotal. - Dates and IDs: ISO-8601 timestamps become
DateTimeand GUID strings becomeGuid. - Arrays are merged: every element of an array is inspected, so a field that appears in only some items becomes nullable, and a field that is sometimes
nullis typed accordingly. - Singular class names:
"items": […]producesList<Item>,"addresses"producesAddress.