Share via


ExtensibleEnumConverter<T> Class

Definition

Serializes and deserializes "extensible enums" to and from JSON. Extensible enums are like enumerations in that they have well-known values, but they are extensible with new values and the values are based on strings instead of integers.

public class ExtensibleEnumConverter<T> : Newtonsoft.Json.JsonConverter
type ExtensibleEnumConverter<'T> = class
    inherit JsonConverter
Public Class ExtensibleEnumConverter(Of T)
Inherits JsonConverter

Type Parameters

T
Inheritance
Newtonsoft.Json.JsonConverter
ExtensibleEnumConverter<T>

Constructors

ExtensibleEnumConverter<T>()

Initializes a new instance of the ExtensibleEnumConverter class.

Methods

CanConvert(Type)

Indicates whether this converter can serialize or deserialize objects of the given type.

ReadJson(JsonReader, Type, Object, JsonSerializer)

Deserializes a string into an ExtensibleEnum.

WriteJson(JsonWriter, Object, JsonSerializer)

Serializes an ExtensibleEnum to a JSON string.

Applies to