using System.Text.Json.Serialization; namespace OI.Metrology.Shared.Models; public record SurfscanRecipe( [property: JsonPropertyName("recipe")] string Recipe, [property: JsonPropertyName("defects")] int Defects, [property: JsonPropertyName("haze")] int Haze, [property: JsonPropertyName("sampleSize")] int? SampleSize ); [JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString)] [JsonSerializable(typeof(SurfscanRecipe))] public partial class SurfscanRecipeSourceGenerationContext : JsonSerializerContext { }