Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Text.​Json.​Serialization.​JsonSourceGenerationOptionsAttribute
Assembly: System.Text.Json
Inheritance: object → Attribute → JsonAttribute → JsonSourceGenerationOptionsAttribute
Instructs the System.Text.Json source generator to assume the specified options will be used at run time via <see cref="T:System.Text.Json.JsonSerializerOptions" /> .
Properties
public
bool
AllowDuplicateProperties
Specifies the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.AllowDuplicateProperties" /> when set.
public
bool
AllowOutOfOrderMetadataProperties
Specifies the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.AllowOutOfOrderMetadataProperties" /> when set.
public
bool
AllowTrailingCommas
Gets or sets the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.AllowTrailingCommas" /> .
public
Type[]
Converters
Gets or sets the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.Converters" /> .
public
int
DefaultBufferSize
Gets or sets the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.DefaultBufferSize" /> .
public
JsonIgnoreCondition
DefaultIgnoreCondition
Gets or sets the default ignore condition.
public
JsonKnownNamingPolicy
DictionaryKeyPolicy
Gets or sets the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.DictionaryKeyPolicy" /> .
public
JsonSourceGenerationMode
GenerationMode
Gets or sets the source generation mode for types that don't explicitly set the mode with <see cref="P:System.Text.Json.Serialization.JsonSerializableAttribute.GenerationMode" /> .
public
bool
IgnoreReadOnlyFields
Gets or sets a value that indicates whether to ignore read-only fields.
public
bool
IgnoreReadOnlyProperties
Gets or sets a value that indicates whether to ignore read-only properties.
public
bool
IncludeFields
Gets or sets a value that indicates whether to include fields for serialization and deserialization.
public
int
MaxDepth
Gets or sets the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.MaxDepth" /> .
public
string
NewLine
Specifies the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.NewLine" /> when set.
public
JsonNumberHandling
NumberHandling
Gets or sets the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.NumberHandling" /> .
public
JsonObjectCreationHandling
PreferredObjectCreationHandling
Gets or sets the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.PreferredObjectCreationHandling" /> .
public
bool
PropertyNameCaseInsensitive
Gets or sets the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.PropertyNameCaseInsensitive" /> .
public
JsonKnownNamingPolicy
PropertyNamingPolicy
Gets or sets a built-in naming policy to convert JSON property names with.
public
JsonCommentHandling
ReadCommentHandling
Gets or sets the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.ReadCommentHandling" /> .
public
JsonKnownReferenceHandler
ReferenceHandler
Specifies the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.ReferenceHandler" /> when set.
public
bool
RespectNullableAnnotations
Specifies the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.RespectNullableAnnotations" /> when set.
public
bool
RespectRequiredConstructorParameters
Specifies the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.RespectRequiredConstructorParameters" /> when set.
public
JsonUnknownTypeHandling
UnknownTypeHandling
Gets or sets the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.UnknownTypeHandling" /> .
public
JsonUnmappedMemberHandling
UnmappedMemberHandling
Gets or sets the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.UnmappedMemberHandling" /> .
public
bool
UseStringEnumConverter
Gets or sets a value that indicates whether the source generator defaults to <see cref="T:System.Text.Json.Serialization.JsonStringEnumConverter" /> instead of numeric serialization for all enum types encountered in its type graph.
public
bool
WriteIndented
Gets or sets a value that indicates whether JSON output is pretty-printed.
public
char
IndentCharacter
Specifies the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.IndentCharacter" /> when set.
public
int
IndentSize
Specifies the default value of <see cref="P:System.Text.Json.JsonSerializerOptions.IndentCharacter" /> when set.
public
object
TypeId
Methods
protected
void
Finalize​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object