<PackageReference Include="System.Text.Json" Version="6.0.8" />

JsonSourceGenerationOptionsAttribute

Instructs the System.Text.Json source generator to assume the specified options will be used at run time via JsonSerializerOptions.

Specifies the default ignore condition.

Specifies the source generation mode for types that don't explicitly set the mode with GenerationMode.

public bool IgnoreReadOnlyFields { get; set; }

Specifies whether to ignore read-only fields.

public bool IgnoreReadOnlyProperties { get; set; }

Specifies whether to ignore read-only properties.

public bool IncludeFields { get; set; }

Specifies whether to include fields for serialization and deserialization.

Specifies a built-in naming polices to convert JSON property names with.

public bool WriteIndented { get; set; }

Specifies whether JSON output should be pretty-printed.