Class FlagsToArrayConverter<T>
Inherited Members
JsonConverter.CanRead
JsonConverter.CanWrite
Namespace: Glitch9.IO.Json
Assembly: Glitch9.IO.dll
Syntax
public class FlagsToArrayConverter<T> : JsonConverter<T> where T : struct, Enum
Type Parameters
| Name | Description |
|---|---|
| T |
Methods
| Edit this page View SourceReadJson(JsonReader, Type, T, bool, JsonSerializer)
Reads the JSON representation of the object.
Declaration
public override T ReadJson(JsonReader reader, Type objectType, T existingValue, bool hasExistingValue, JsonSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonReader | reader | The Newtonsoft.Json.JsonReader to read from. |
| Type | objectType | Type of the object. |
| T | existingValue | The existing value of object being read. If there is no existing value then |
| bool | hasExistingValue | The existing value has a value. |
| JsonSerializer | serializer | The calling serializer. |
Returns
| Type | Description |
|---|---|
| T | The object value. |
Overrides
| Edit this page View SourceWriteJson(JsonWriter, T, JsonSerializer)
Writes the JSON representation of the object.
Declaration
public override void WriteJson(JsonWriter writer, T value, JsonSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonWriter | writer | The Newtonsoft.Json.JsonWriter to write to. |
| T | value | The value. |
| JsonSerializer | serializer | The calling serializer. |
Overrides
Newtonsoft.Json.JsonConverter<T>.WriteJson(Newtonsoft.Json.JsonWriter, T, Newtonsoft.Json.JsonSerializer)