JsonSourceGenerationOptionsAttribute Class

Definition

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
JsonSourceGenerationOptionsAttribute
Attributes

Constructors

JsonSourceGenerationOptionsAttribute()

Initializes a new instance of JsonSourceGenerationOptionsAttribute.

Properties

DefaultIgnoreCondition

Gets or sets the default ignore condition.

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.

PropertyNamingPolicy

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

TypeId

When implemented in a derived class, gets a unique identifier for this Attribute.

(Inherited from Attribute)
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