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.​JsonSerializableAttribute

Assembly: System.Text.Json

Inheritance: object → AttributeJsonAttribute → JsonSerializableAttribute

Instructs the System.Text.Json source generator to generate source code to help optimize performance when serializing and deserializing instances of the specified type and types in its object graph.

Properties

GenerationMode
Gets or sets the mode that indicates what the source generator should generate for the type. If the value is <see cref="F:System.Text.Json.Serialization.JsonSourceGenerationMode.Default" /> , then the setting specified on <see cref="P:System.Text.Json.Serialization.JsonSourceGenerationOptionsAttribute.GenerationMode" /> will be used.
public string
TypeInfoPropertyName
Gets or sets the name of the property for the generated <see cref="T:System.Text.Json.Serialization.Metadata.JsonTypeInfo`1" /> for the type on the generated, derived <see cref="T:System.Text.Json.Serialization.JsonSerializerContext" /> type.
public object
TypeId

Methods

public bool
Equals​(object obj)
Inherited from Attribute
public int
GetHashCode​()
Inherited from Attribute
public bool
IsDefaultAttribute​()
Inherited from Attribute
public bool
Match​(object obj)
Inherited from Attribute
protected void
Finalize​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object