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

Assembly: System.Text.Json

Inheritance: object → JsonConverterJsonConverterFactory → JsonStringEnumConverter

Converts enumeration values to and from strings.

Properties

public Type
Type
Gets the type being converted by the current converter instance.

Methods

public bool
CanConvert​(Type typeToConvert)
Determines whether the specified type can be converted to an enum.
Returns <see langword="true" /> if the type can be converted; otherwise, <see langword="false" /> .
typeToConvert The type to be checked.
public JsonConverter
CreateConverter​(Type typeToConvert, JsonSerializerOptions options)
Creates a converter for the specified type.
Returns A converter for which <typeparamref name="T" /> is compatible with <paramref name="typeToConvert" /> .
typeToConvert The type handled by the converter.
options The serialization options to use.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object