Class StringEnumConverter
Converts an System.
Inherited Members
Namespace: Bayat.Json.Converters
Assembly: Bayat.Json.Runtime.dll
Syntax
public class StringEnumConverter : JsonConverter
Constructors
| Improve this Doc View SourceStringEnumConverter()
Initializes a new instance of the String
Declaration
public StringEnumConverter()
StringEnumConverter(Boolean)
Initializes a new instance of the String
Declaration
public StringEnumConverter(bool camelCaseText)
Parameters
Type | Name | Description |
---|---|---|
System. |
camelCaseText |
|
Properties
| Improve this Doc View SourceAllowIntegerValues
Gets or sets a value indicating whether integer values are allowed.
Declaration
public bool AllowIntegerValues { get; set; }
Property Value
Type | Description |
---|---|
System. |
|
CamelCaseText
Gets or sets a value indicating whether the written enum text should be camel case.
Declaration
public bool CamelCaseText { get; set; }
Property Value
Type | Description |
---|---|
System. |
|
Methods
| Improve this Doc View SourceCanConvert(Type)
Determines whether this instance can convert the specified object type.
Declaration
public override bool CanConvert(Type objectType)
Parameters
Type | Name | Description |
---|---|---|
System. |
objectType | Type of the object. |
Returns
Type | Description |
---|---|
System. |
|
Overrides
| Improve this Doc View SourceReadJson(JsonReader, Type, Object, JsonSerializerReader)
Reads the JSON representation of the object.
Declaration
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializerReader internalReader)
Parameters
Type | Name | Description |
---|---|---|
Json |
reader | The Json |
System. |
objectType | Type of the object. |
System. |
existingValue | The existing value of object being read. |
Json |
internalReader |
Returns
Type | Description |
---|---|
System. |
The object value. |
Overrides
| Improve this Doc View SourceWriteJson(JsonWriter, Object, JsonSerializerWriter)
Writes the JSON representation of the object.
Declaration
public override void WriteJson(JsonWriter writer, object value, JsonSerializerWriter internalWriter)
Parameters
Type | Name | Description |
---|---|---|
Json |
writer | The Json |
System. |
value | The value. |
Json |
internalWriter |