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

Assembly: System.Text.Json

Inheritance: object → AttributeJsonAttribute → JsonConverterAttribute

When placed on a property or type, specifies the converter type to use.

Properties

public Type
ConverterType
Gets the type of the <see cref="T:System.Text.Json.Serialization.JsonConverterAttribute" /> , or <see langword="null" /> if it was created without a type.
public object
TypeId

Methods

public JsonConverter
CreateConverter​(Type typeToConvert)
When overridden in a derived class and <see cref="P:System.Text.Json.Serialization.JsonConverterAttribute.ConverterType" /> is <see langword="null" /> , allows the derived class to create a <see cref="T:System.Text.Json.Serialization.JsonConverter" /> in order to pass additional state.
Returns The custom converter.
typeToConvert The type of the converter.
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