using System.Text.Json; namespace AIStudio.Assistants.BeyondFactsLab; /// /// How the BeyondFacts Lab reads the JSON which models write for it. /// internal static class BflModelAnswerJson { /// /// The options for the JSON in a model answer. They forgive what models often write, such as trailing commas, /// comments, or another case, but refuse a field named twice: another reader might see its other value. /// internal static readonly JsonSerializerOptions OPTIONS = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase, PropertyNameCaseInsensitive = true, AllowTrailingCommas = true, ReadCommentHandling = JsonCommentHandling.Skip, RespectNullableAnnotations = true, AllowDuplicateProperties = false, TypeInfoResolver = BflModelAnswerJsonContext.Default, }.AsReadOnly(); }