JsonSourceGenerationOptionsAttribute
Instructs the System.Text.Json source generator to assume the specified options will be used at run time via JsonSerializerOptions.
namespace System.Text.Json.Serialization
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class JsonSourceGenerationOptionsAttribute : JsonAttribute
{
public JsonIgnoreCondition DefaultIgnoreCondition { get; set; }
public bool IgnoreReadOnlyFields { get; set; }
public bool IgnoreReadOnlyProperties { get; set; }
public bool IncludeFields { get; set; }
public JsonKnownNamingPolicy PropertyNamingPolicy { get; set; }
public bool WriteIndented { get; set; }
public JsonSourceGenerationMode GenerationMode { get; set; }
}
}