using System.Text.Json; using System.Text.Json.Serialization; namespace Brutal.GltfApi; /// /// Source-generated System.Text.Json metadata for the glTF schema, so that loading and saving /// works without reflection (trimming and Native AOT). /// /// /// The generator emits the other half of this class (GeneratedSchema/GltfJsonContext.gen.cs) with every /// : the document root, every extension root type, the nested enums and /// . Don't add here; the System.Text.Json source /// generator fails when more than one partial declaration carries it. /// [JsonSourceGenerationOptions( // glTF has no concept of an explicit JSON null; absent optional properties must be // omitted entirely or strict validators reject the asset (e.g. "uri": null in GLB). DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, Converters = [ typeof(JsonHelpers.Float3JsonConverter), typeof(JsonHelpers.Float4JsonConverter), typeof(JsonHelpers.FloatQuatJsonConverter), typeof(JsonHelpers.Float4X4JsonConverter), ] )] internal partial class GltfJsonContext : JsonSerializerContext;