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

JsonSourceGenerationOptionsAttribute

Instructs the System.Text.Json source generator to assume the specified options will be used at run time via JsonSerializerOptions.
public bool AllowOutOfOrderMetadataProperties { get; set; }

Specifies the default value of AllowOutOfOrderMetadataProperties when set.

public bool AllowTrailingCommas { get; set; }

Gets or sets the default value of AllowTrailingCommas.

public Type[] Converters { get; set; }

Gets or sets the default value of Converters.

public int DefaultBufferSize { get; set; }

Gets or sets the default value of DefaultBufferSize.

Gets or sets the default ignore condition.

Gets or sets the default value of DictionaryKeyPolicy.

Gets or sets the source generation mode for types that don't explicitly set the mode with GenerationMode.

public bool IgnoreReadOnlyFields { get; set; }

Gets or sets a value that indicates whether to ignore read-only fields.

public bool IgnoreReadOnlyProperties { get; set; }

Gets or sets a value that indicates whether to ignore read-only properties.

public bool IncludeFields { get; set; }

Gets or sets a value that indicates whether to include fields for serialization and deserialization.

public char IndentCharacter { get; set; }

Specifies the default value of IndentCharacter when set.

public int IndentSize { get; set; }

Specifies the default value of IndentCharacter when set.

public int MaxDepth { get; set; }

Gets or sets the default value of MaxDepth.

public string NewLine { get; set; }

Specifies the default value of NewLine when set.

public JsonNumberHandling NumberHandling { get; set; }

Gets or sets the default value of NumberHandling.

Gets or sets the default value of PreferredObjectCreationHandling.

public bool PropertyNameCaseInsensitive { get; set; }

Gets or sets the default value of PropertyNameCaseInsensitive.

Gets or sets a built-in naming policy to convert JSON property names with.

Gets or sets the default value of ReadCommentHandling.

public bool RespectNullableAnnotations { get; set; }

Specifies the default value of RespectNullableAnnotations when set.

public bool RespectRequiredConstructorParameters { get; set; }

Specifies the default value of RespectRequiredConstructorParameters when set.

Gets or sets the default value of UnknownTypeHandling.

Gets or sets the default value of UnmappedMemberHandling.

public bool UseStringEnumConverter { get; set; }

Gets or sets a value that indicates whether the source generator defaults to JsonStringEnumConverter instead of numeric serialization for all enum types encountered in its type graph.

public bool WriteIndented { get; set; }

Gets or sets a value that indicates whether JSON output is pretty-printed.

Initializes a new instance of JsonSourceGenerationOptionsAttribute.

Constructs a new JsonSourceGenerationOptionsAttribute instance with a predefined set of options determined by the specified JsonSerializerDefaults.