What .NET types does the ByteKiln JSON to C# generator infer?
string, int, long (for whole numbers over 2,147,483,647), double, bool, DateTime (from full ISO 8601 datetime strings, not bare dates), and Guid (from UUID-format strings). Nested objects become their own classes and arrays become List<T> properties.
What happens when a JSON value is null?
A null value is always typed as string? — the generator has no way to infer the real type from a null sample, so it defaults to a nullable string rather than guessing. Replace the type by hand once you know what it should really be.
Does this work with Newtonsoft.Json (Json.NET), or only System.Text.Json?
Only System.Text.Json. The "JSON attributes" option emits [JsonPropertyName("...")] from System.Text.Json.Serialization. If your project uses Newtonsoft.Json, swap that for [JsonProperty("...")] from the Newtonsoft.Json namespace.
Does it add [JsonPropertyName] for snake_case keys like first_name?
No. The generator only adds a [JsonPropertyName] attribute when a key has a hyphen, a dot, a space, or a leading digit — the kinds of keys that can't cleanly become a PascalCase identifier. A snake_case key like first_name becomes FirstName with no attribute, so if you deserialize the original JSON with System.Text.Json you still need PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower (or add the attribute yourself) or the values won't map back.
What is the difference between generating a class and a record?
Class output uses { get; set; } — ordinary mutable properties. Record output uses { get; init; } — properties that can only be set during construction, matching how C# records are normally used for immutable data. Both are plain property bags; neither option adds a constructor.
Does it handle an array of objects, or only single objects?
Both, but for any array — the top-level input or a nested property — only the first element is inspected to infer the shape. If you paste an array where later items have fields the first item doesn't, those extra fields won't appear in the generated class.
Can I use the generated classes in production?
As a starting point, yes — review it first. The generator infers int/long/double for all numbers (it never infers decimal, so money fields need a manual fix), doesn't deduplicate identical nested shapes under different property names, and doesn't add validation attributes or constructors.
Is my JSON data sent anywhere?
No. The JSON is parsed and the classes generated in your browser; the payload is not sent to a ByteKiln server or logged by the tool. If you press Share, the link itself carries a readable copy of your input, so don't share links that contain secrets.