Click or drag to resize
Json.NETStringEnumConverter Class
Converts an Enum to and from its name string value.
Inheritance Hierarchy

Namespace: Newtonsoft.Json.Converters
Assembly: Newtonsoft.Json (in Newtonsoft.Json.dll) Version: (
public class StringEnumConverter : JsonConverter

The StringEnumConverter type exposes the following members.

Public methodStringEnumConverter
Initializes a new instance of the StringEnumConverter class.
Public propertyAllowIntegerValues
Gets or sets a value indicating whether integer values are allowed.
Public propertyCamelCaseText
Gets or sets a value indicating whether the written enum text should be camel case.
Public propertyCanRead
Gets a value indicating whether this JsonConverter can read JSON.
(Inherited from JsonConverter.)
Public propertyCanWrite
Gets a value indicating whether this JsonConverter can write JSON.
(Inherited from JsonConverter.)
Public methodCanConvert
Determines whether this instance can convert the specified object type.
(Overrides JsonConverterCanConvert(Type).)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetSchema Obsolete.

Gets the JsonSchema of the JSON produced by the JsonConverter.

Caution note Caution
JSON Schema validation has been moved to its own package. See for more details.
(Inherited from JsonConverter.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReadJson
Reads the JSON representation of the object.
(Overrides JsonConverterReadJson(JsonReader, Type, Object, JsonSerializer).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWriteJson
Writes the JSON representation of the object.
(Overrides JsonConverterWriteJson(JsonWriter, Object, JsonSerializer).)
See Also