JsonSourceGenerationOptionsAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Instructs the System.Text.Json source generator to assume the specified options will be used at run time via JsonSerializerOptions.
public ref class JsonSourceGenerationOptionsAttribute sealed : System::Text::Json::Serialization::JsonAttribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false)]
public sealed class JsonSourceGenerationOptionsAttribute : System.Text.Json.Serialization.JsonAttribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false)>]
type JsonSourceGenerationOptionsAttribute = class
inherit JsonAttribute
Public NotInheritable Class JsonSourceGenerationOptionsAttribute
Inherits JsonAttribute
- Inheritance
- Attributes
Constructors
JsonSourceGenerationOptionsAttribute() |
Initializes a new instance of JsonSourceGenerationOptionsAttribute. |
JsonSourceGenerationOptionsAttribute(JsonSerializerDefaults) |
Constructs a new JsonSourceGenerationOptionsAttribute instance with a predefined set of options determined by the specified JsonSerializerDefaults. |
Properties
AllowOutOfOrderMetadataProperties |
Specifies the default value of AllowOutOfOrderMetadataProperties when set. |
AllowTrailingCommas |
Gets or sets the default value of AllowTrailingCommas. |
Converters |
Gets or sets the default value of Converters. |
DefaultBufferSize |
Gets or sets the default value of DefaultBufferSize. |
DefaultIgnoreCondition |
Gets or sets the default ignore condition. |
DictionaryKeyPolicy |
Gets or sets the default value of DictionaryKeyPolicy. |
GenerationMode |
Gets or sets the source generation mode for types that don't explicitly set the mode with GenerationMode. |
IgnoreReadOnlyFields |
Gets or sets a value that indicates whether to ignore read-only fields. |
IgnoreReadOnlyProperties |
Gets or sets a value that indicates whether to ignore read-only properties. |
IncludeFields |
Gets or sets a value that indicates whether to include fields for serialization and deserialization. |
IndentCharacter |
Specifies the default value of IndentCharacter when set. |
IndentSize |
Specifies the default value of IndentCharacter when set. |
MaxDepth |
Gets or sets the default value of MaxDepth. |
NewLine |
Specifies the default value of NewLine when set. |
NumberHandling |
Gets or sets the default value of NumberHandling. |
PreferredObjectCreationHandling |
Gets or sets the default value of PreferredObjectCreationHandling. |
PropertyNameCaseInsensitive |
Gets or sets the default value of PropertyNameCaseInsensitive. |
PropertyNamingPolicy |
Gets or sets a built-in naming policy to convert JSON property names with. |
ReadCommentHandling |
Gets or sets the default value of ReadCommentHandling. |
RespectNullableAnnotations |
Specifies the default value of RespectNullableAnnotations when set. |
RespectRequiredConstructorParameters |
Specifies the default value of RespectRequiredConstructorParameters when set. |
TypeId |
When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute) |
UnknownTypeHandling |
Gets or sets the default value of UnknownTypeHandling. |
UnmappedMemberHandling |
Gets or sets the default value of UnmappedMemberHandling. |
UseStringEnumConverter |
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. |
WriteIndented |
Gets or sets a value that indicates whether JSON output is pretty-printed. |
Methods
Equals(Object) |
Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute) |
GetHashCode() |
Returns the hash code for this instance. (Inherited from Attribute) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
IsDefaultAttribute() |
When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute) |
Match(Object) |
When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |
Applies to
.NET